mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 18:25:49 +03:00
Merge pull request #4550 from matrix-org/bwindels/unverif-session-copy-self-rc
Differentiate copy for own untrusted device dialog
This commit is contained in:
commit
16099f731d
2 changed files with 17 additions and 3 deletions
|
@ -306,9 +306,11 @@
|
||||||
"%(senderName)s updated a ban rule that was matching %(oldGlob)s to matching %(newGlob)s for %(reason)s": "%(senderName)s updated a ban rule that was matching %(oldGlob)s to matching %(newGlob)s for %(reason)s",
|
"%(senderName)s updated a ban rule that was matching %(oldGlob)s to matching %(newGlob)s for %(reason)s": "%(senderName)s updated a ban rule that was matching %(oldGlob)s to matching %(newGlob)s for %(reason)s",
|
||||||
"Light theme": "Light theme",
|
"Light theme": "Light theme",
|
||||||
"Dark theme": "Dark theme",
|
"Dark theme": "Dark theme",
|
||||||
"Not Trusted": "Not Trusted",
|
"You signed in to a new session without verifying it:": "You signed in to a new session without verifying it:",
|
||||||
|
"Verify your other session using one of the options below.": "Verify your other session using one of the options below.",
|
||||||
"%(name)s (%(userId)s) signed in to a new session without verifying it:": "%(name)s (%(userId)s) signed in to a new session without verifying it:",
|
"%(name)s (%(userId)s) signed in to a new session without verifying it:": "%(name)s (%(userId)s) signed in to a new session without verifying it:",
|
||||||
"Ask this user to verify their session, or manually verify it below.": "Ask this user to verify their session, or manually verify it below.",
|
"Ask this user to verify their session, or manually verify it below.": "Ask this user to verify their session, or manually verify it below.",
|
||||||
|
"Not Trusted": "Not Trusted",
|
||||||
"Manually Verify by Text": "Manually Verify by Text",
|
"Manually Verify by Text": "Manually Verify by Text",
|
||||||
"Interactively verify by Emoji": "Interactively verify by Emoji",
|
"Interactively verify by Emoji": "Interactively verify by Emoji",
|
||||||
"Done": "Done",
|
"Done": "Done",
|
||||||
|
|
|
@ -43,14 +43,26 @@ function UntrustedDeviceDialog(props) {
|
||||||
const {device, user, onFinished} = props;
|
const {device, user, onFinished} = props;
|
||||||
const BaseDialog = sdk.getComponent("dialogs.BaseDialog");
|
const BaseDialog = sdk.getComponent("dialogs.BaseDialog");
|
||||||
const AccessibleButton = sdk.getComponent("elements.AccessibleButton");
|
const AccessibleButton = sdk.getComponent("elements.AccessibleButton");
|
||||||
|
let askToVerifyText;
|
||||||
|
let newSessionText;
|
||||||
|
|
||||||
|
if (MatrixClientPeg.get().getUserId() === user.userId) {
|
||||||
|
newSessionText = _t("You signed in to a new session without verifying it:");
|
||||||
|
askToVerifyText = _t("Verify your other session using one of the options below.");
|
||||||
|
} else {
|
||||||
|
newSessionText = _t("%(name)s (%(userId)s) signed in to a new session without verifying it:",
|
||||||
|
{name: user.displayName, userId: user.userId});
|
||||||
|
askToVerifyText = _t("Ask this user to verify their session, or manually verify it below.");
|
||||||
|
}
|
||||||
|
|
||||||
return <BaseDialog
|
return <BaseDialog
|
||||||
onFinished={onFinished}
|
onFinished={onFinished}
|
||||||
headerImage={require("../res/img/e2e/warning.svg")}
|
headerImage={require("../res/img/e2e/warning.svg")}
|
||||||
title={_t("Not Trusted")}>
|
title={_t("Not Trusted")}>
|
||||||
<div className="mx_Dialog_content" id='mx_Dialog_content'>
|
<div className="mx_Dialog_content" id='mx_Dialog_content'>
|
||||||
<p>{_t("%(name)s (%(userId)s) signed in to a new session without verifying it:", {name: user.displayName, userId: user.userId})}</p>
|
<p>{newSessionText}</p>
|
||||||
<p>{device.getDisplayName()} ({device.deviceId})</p>
|
<p>{device.getDisplayName()} ({device.deviceId})</p>
|
||||||
<p>{_t("Ask this user to verify their session, or manually verify it below.")}</p>
|
<p>{askToVerifyText}</p>
|
||||||
</div>
|
</div>
|
||||||
<div className='mx_Dialog_buttons'>
|
<div className='mx_Dialog_buttons'>
|
||||||
<AccessibleButton element="button" kind="secondary" onClick={() => onFinished("legacy")}>{_t("Manually Verify by Text")}</AccessibleButton>
|
<AccessibleButton element="button" kind="secondary" onClick={() => onFinished("legacy")}>{_t("Manually Verify by Text")}</AccessibleButton>
|
||||||
|
|
Loading…
Reference in a new issue