Merge pull request #4000 from matrix-org/foldleft/12038-copy
Update copy when the user verifies their own devicespull/21833/head
commit
585a38cd45
|
@ -233,6 +233,7 @@ export default class DeviceVerifyDialog extends React.Component {
|
||||||
sas={this._showSasEvent.sas}
|
sas={this._showSasEvent.sas}
|
||||||
onCancel={this._onCancelClick}
|
onCancel={this._onCancelClick}
|
||||||
onDone={this._onSasMatchesClick}
|
onDone={this._onSasMatchesClick}
|
||||||
|
isSelf={MatrixClientPeg.get().getUserId() === this.props.userId}
|
||||||
/>;
|
/>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -121,6 +121,8 @@ export default class IncomingSasDialog extends React.Component {
|
||||||
const Spinner = sdk.getComponent("views.elements.Spinner");
|
const Spinner = sdk.getComponent("views.elements.Spinner");
|
||||||
const BaseAvatar = sdk.getComponent("avatars.BaseAvatar");
|
const BaseAvatar = sdk.getComponent("avatars.BaseAvatar");
|
||||||
|
|
||||||
|
const isSelf = this.props.verifier.userId == MatrixClientPeg.get().getUserId();
|
||||||
|
|
||||||
let profile;
|
let profile;
|
||||||
if (this.state.opponentProfile) {
|
if (this.state.opponentProfile) {
|
||||||
profile = <div className="mx_IncomingSasDialog_opponentProfile">
|
profile = <div className="mx_IncomingSasDialog_opponentProfile">
|
||||||
|
@ -148,20 +150,36 @@ export default class IncomingSasDialog extends React.Component {
|
||||||
profile = <Spinner />;
|
profile = <Spinner />;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
const userDetailText = [
|
||||||
<div>
|
<p key="p1">{_t(
|
||||||
{profile}
|
|
||||||
<p>{_t(
|
|
||||||
"Verify this user to mark them as trusted. " +
|
"Verify this user to mark them as trusted. " +
|
||||||
"Trusting users gives you extra peace of mind when using " +
|
"Trusting users gives you extra peace of mind when using " +
|
||||||
"end-to-end encrypted messages.",
|
"end-to-end encrypted messages.",
|
||||||
)}</p>
|
)}</p>,
|
||||||
<p>{_t(
|
<p key="p2">{_t(
|
||||||
// NB. Below wording adjusted to singular 'session' until we have
|
// NB. Below wording adjusted to singular 'session' until we have
|
||||||
// cross-signing
|
// cross-signing
|
||||||
"Verifying this user will mark their session as trusted, and " +
|
"Verifying this user will mark their session as trusted, and " +
|
||||||
"also mark your session as trusted to them.",
|
"also mark your session as trusted to them.",
|
||||||
)}</p>
|
)}</p>,
|
||||||
|
];
|
||||||
|
|
||||||
|
const selfDetailText = [
|
||||||
|
<p key="p1">{_t(
|
||||||
|
"Verify this device to mark it as trusted. " +
|
||||||
|
"Trusting this device gives you and other users extra peace of mind when using " +
|
||||||
|
"end-to-end encrypted messages.",
|
||||||
|
)}</p>,
|
||||||
|
<p key="p2">{_t(
|
||||||
|
"Verifying this device will mark it as trusted, and users who have verified with " +
|
||||||
|
"you will trust this device.",
|
||||||
|
)}</p>,
|
||||||
|
];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
{profile}
|
||||||
|
{isSelf ? selfDetailText : userDetailText}
|
||||||
<DialogButtons
|
<DialogButtons
|
||||||
primaryButton={_t('Continue')}
|
primaryButton={_t('Continue')}
|
||||||
hasCancel={true}
|
hasCancel={true}
|
||||||
|
@ -178,6 +196,7 @@ export default class IncomingSasDialog extends React.Component {
|
||||||
sas={this._showSasEvent.sas}
|
sas={this._showSasEvent.sas}
|
||||||
onCancel={this._onCancelClick}
|
onCancel={this._onCancelClick}
|
||||||
onDone={this._onSasMatchesClick}
|
onDone={this._onSasMatchesClick}
|
||||||
|
isSelf={this.props.verifier.userId == MatrixClientPeg.get().getUserId()}
|
||||||
/>;
|
/>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ export default class VerificationShowSas extends React.Component {
|
||||||
onDone: PropTypes.func.isRequired,
|
onDone: PropTypes.func.isRequired,
|
||||||
onCancel: PropTypes.func.isRequired,
|
onCancel: PropTypes.func.isRequired,
|
||||||
sas: PropTypes.object.isRequired,
|
sas: PropTypes.object.isRequired,
|
||||||
|
isSelf: PropTypes.bool,
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
@ -66,7 +67,11 @@ export default class VerificationShowSas extends React.Component {
|
||||||
<div className="mx_VerificationShowSas_emojiSas_break" />
|
<div className="mx_VerificationShowSas_emojiSas_break" />
|
||||||
{emojiBlocks.slice(4)}
|
{emojiBlocks.slice(4)}
|
||||||
</div>;
|
</div>;
|
||||||
sasCaption = _t(
|
sasCaption = this.props.isSelf ?
|
||||||
|
_t(
|
||||||
|
"Confirm the emoji below are displayed on both devices, in the same order:",
|
||||||
|
):
|
||||||
|
_t(
|
||||||
"Verify this user by confirming the following emoji appear on their screen.",
|
"Verify this user by confirming the following emoji appear on their screen.",
|
||||||
);
|
);
|
||||||
} else if (this.props.sas.decimal) {
|
} else if (this.props.sas.decimal) {
|
||||||
|
@ -76,7 +81,11 @@ export default class VerificationShowSas extends React.Component {
|
||||||
sasDisplay = <div className="mx_VerificationShowSas_decimalSas">
|
sasDisplay = <div className="mx_VerificationShowSas_decimalSas">
|
||||||
{numberBlocks}
|
{numberBlocks}
|
||||||
</div>;
|
</div>;
|
||||||
sasCaption = _t(
|
sasCaption = this.props.isSelf ?
|
||||||
|
_t(
|
||||||
|
"Verify this device by confirming the following number appears on its screen.",
|
||||||
|
):
|
||||||
|
_t(
|
||||||
"Verify this user by confirming the following number appears on their screen.",
|
"Verify this user by confirming the following number appears on their screen.",
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
@ -108,7 +117,9 @@ export default class VerificationShowSas extends React.Component {
|
||||||
return <div className="mx_VerificationShowSas">
|
return <div className="mx_VerificationShowSas">
|
||||||
<p>{sasCaption}</p>
|
<p>{sasCaption}</p>
|
||||||
{sasDisplay}
|
{sasDisplay}
|
||||||
<p>{_t("To be secure, do this in person or use a trusted way to communicate.")}</p>
|
<p>{this.props.isSelf ?
|
||||||
|
"":
|
||||||
|
_t("To be secure, do this in person or use a trusted way to communicate.")}</p>
|
||||||
{confirm}
|
{confirm}
|
||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
|
|
|
@ -444,7 +444,9 @@
|
||||||
"You've successfully verified this user.": "You've successfully verified this user.",
|
"You've successfully verified this user.": "You've successfully verified this user.",
|
||||||
"Secure messages with this user are end-to-end encrypted and not able to be read by third parties.": "Secure messages with this user are end-to-end encrypted and not able to be read by third parties.",
|
"Secure messages with this user are end-to-end encrypted and not able to be read by third parties.": "Secure messages with this user are end-to-end encrypted and not able to be read by third parties.",
|
||||||
"Got It": "Got It",
|
"Got It": "Got It",
|
||||||
|
"Confirm the emoji below are displayed on both devices, in the same order:": "Confirm the emoji below are displayed on both devices, in the same order:",
|
||||||
"Verify this user by confirming the following emoji appear on their screen.": "Verify this user by confirming the following emoji appear on their screen.",
|
"Verify this user by confirming the following emoji appear on their screen.": "Verify this user by confirming the following emoji appear on their screen.",
|
||||||
|
"Verify this device by confirming the following number appears on its screen.": "Verify this device by confirming the following number appears on its screen.",
|
||||||
"Verify this user by confirming the following number appears on their screen.": "Verify this user by confirming the following number appears on their screen.",
|
"Verify this user by confirming the following number appears on their screen.": "Verify this user by confirming the following number appears on their screen.",
|
||||||
"Unable to find a supported verification method.": "Unable to find a supported verification method.",
|
"Unable to find a supported verification method.": "Unable to find a supported verification method.",
|
||||||
"Cancel": "Cancel",
|
"Cancel": "Cancel",
|
||||||
|
@ -1493,6 +1495,8 @@
|
||||||
"An error has occurred.": "An error has occurred.",
|
"An error has occurred.": "An error has occurred.",
|
||||||
"Verify this user to mark them as trusted. Trusting users gives you extra peace of mind when using end-to-end encrypted messages.": "Verify this user to mark them as trusted. Trusting users gives you extra peace of mind when using end-to-end encrypted messages.",
|
"Verify this user to mark them as trusted. Trusting users gives you extra peace of mind when using end-to-end encrypted messages.": "Verify this user to mark them as trusted. Trusting users gives you extra peace of mind when using end-to-end encrypted messages.",
|
||||||
"Verifying this user will mark their session as trusted, and also mark your session as trusted to them.": "Verifying this user will mark their session as trusted, and also mark your session as trusted to them.",
|
"Verifying this user will mark their session as trusted, and also mark your session as trusted to them.": "Verifying this user will mark their session as trusted, and also mark your session as trusted to them.",
|
||||||
|
"Verify this device to mark it as trusted. Trusting this device gives you and other users extra peace of mind when using end-to-end encrypted messages.": "Verify this device to mark it as trusted. Trusting this device gives you and other users extra peace of mind when using end-to-end encrypted messages.",
|
||||||
|
"Verifying this device will mark it as trusted, and users who have verified with you will trust this device.": "Verifying this device will mark it as trusted, and users who have verified with you will trust this device.",
|
||||||
"Waiting for partner to confirm...": "Waiting for partner to confirm...",
|
"Waiting for partner to confirm...": "Waiting for partner to confirm...",
|
||||||
"Incoming Verification Request": "Incoming Verification Request",
|
"Incoming Verification Request": "Incoming Verification Request",
|
||||||
"Integrations are disabled": "Integrations are disabled",
|
"Integrations are disabled": "Integrations are disabled",
|
||||||
|
|
Loading…
Reference in New Issue