Make warning bold, close copied tooltip on escape

Signed-off-by: Aaron Raimist <aaron@raim.ist>
This commit is contained in:
Aaron Raimist 2021-04-30 21:45:33 -05:00
parent 31ff05a862
commit 626a4ccc34
No known key found for this signature in database
GPG Key ID: 37419210002890EF

View File

@ -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) => {
if (!PlatformPeg.get()) return;
@ -168,7 +174,7 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
...toRightOf(buttonRect, 2),
message: successful ? _t('Copied!') : _t('Failed to copy'),
});
target.onmouseleave = close;
this.closeCopiedTooltip = target.onmouseleave = close;
}
render() {
@ -290,8 +296,8 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
<br />
<details>
<summary>{_t("Access Token")}</summary><br />
{ _t("Your access token gives full access to your account."
+ " Do not share it with anyone." ) }
<b>{_t("Your access token gives full access to your account."
+ " Do not share it with anyone." )}</b>
<div className="mx_HelpUserSettingsTab_accessToken">
<code>{MatrixClientPeg.get().getAccessToken()}</code>
<AccessibleTooltipButton