Skip to content

Commit 3240b3b

Browse files
committed
Add device name to unverified session toast
1 parent 3acb952 commit 3240b3b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/components/views/toasts/UnverifiedSessionToast.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,13 @@ export default class UnverifiedSessionToast extends React.PureComponent {
4949
};
5050

5151
render() {
52+
const cli = MatrixClientPeg.get();
53+
const device = cli.getStoredDevice(cli.getUserId(), this.props.deviceId);
54+
5255
return (<div>
5356
<div className="mx_Toast_description">
54-
{_t("Verify the new login accessing your account & messages")}
57+
{_t(
58+
"Verify the new login accessing your account: %(name)s", { name: device.getDisplayName()})}
5559
</div>
5660
<div className="mx_Toast_buttons" aria-live="off">
5761
<FormButton label={_t("Later")} kind="danger" onClick={this._onLaterClick} />

src/i18n/strings/en_EN.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@
568568
"Set up": "Set up",
569569
"Upgrade": "Upgrade",
570570
"Verify": "Verify",
571-
"Verify the new login accessing your account & messages": "Verify the new login accessing your account & messages",
571+
"Verify the new login accessing your account: %(name)s": "Verify the new login accessing your account: %(name)s",
572572
"From %(deviceName)s (%(deviceId)s)": "From %(deviceName)s (%(deviceId)s)",
573573
"Decline (%(counter)s)": "Decline (%(counter)s)",
574574
"Accept <policyLink /> to continue:": "Accept <policyLink /> to continue:",

0 commit comments

Comments
 (0)