Make warning bold, close copied tooltip on escape
Signed-off-by: Aaron Raimist <aaron@raim.ist>pull/21833/head
parent
31ff05a862
commit
626a4ccc34
|
@ -60,6 +60,12 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
// if the Copied tooltip is open then get rid of it, there are ways to close the modal which wouldn't close
|
||||||
|
// the tooltip otherwise, such as pressing Escape
|
||||||
|
if (this.closeCopiedTooltip) this.closeCopiedTooltip();
|
||||||
|
}
|
||||||
|
|
||||||
private onClearCacheAndReload = (e) => {
|
private onClearCacheAndReload = (e) => {
|
||||||
if (!PlatformPeg.get()) return;
|
if (!PlatformPeg.get()) return;
|
||||||
|
|
||||||
|
@ -168,7 +174,7 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
|
||||||
...toRightOf(buttonRect, 2),
|
...toRightOf(buttonRect, 2),
|
||||||
message: successful ? _t('Copied!') : _t('Failed to copy'),
|
message: successful ? _t('Copied!') : _t('Failed to copy'),
|
||||||
});
|
});
|
||||||
target.onmouseleave = close;
|
this.closeCopiedTooltip = target.onmouseleave = close;
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
@ -290,8 +296,8 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
|
||||||
<br />
|
<br />
|
||||||
<details>
|
<details>
|
||||||
<summary>{_t("Access Token")}</summary><br />
|
<summary>{_t("Access Token")}</summary><br />
|
||||||
{ _t("Your access token gives full access to your account."
|
<b>{_t("Your access token gives full access to your account."
|
||||||
+ " Do not share it with anyone." ) }
|
+ " Do not share it with anyone." )}</b>
|
||||||
<div className="mx_HelpUserSettingsTab_accessToken">
|
<div className="mx_HelpUserSettingsTab_accessToken">
|
||||||
<code>{MatrixClientPeg.get().getAccessToken()}</code>
|
<code>{MatrixClientPeg.get().getAccessToken()}</code>
|
||||||
<AccessibleTooltipButton
|
<AccessibleTooltipButton
|
||||||
|
|
Loading…
Reference in New Issue