copy for verification screen

This commit is contained in:
Zoe 2020-01-30 16:11:05 +00:00
parent 9f5f15d1d3
commit 4a3ea30e52
4 changed files with 20 additions and 7 deletions

View file

@ -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}
/>; />;
} }

View file

@ -121,7 +121,7 @@ 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().credentials.userId; const isSelf = this.props.verifier.userId == MatrixClientPeg.get().getUserId();
let profile; let profile;
if (this.state.opponentProfile) { if (this.state.opponentProfile) {
@ -196,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()}
/>; />;
} }

View file

@ -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,9 +67,13 @@ 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 ?
"Verify this user by confirming the following emoji appear on their screen.", _t(
); "Verify the device by confirming the following emoji appers on its screen.",
):
_t(
"Verify this user by confirming the following emoji appear on their screen.",
);
} else if (this.props.sas.decimal) { } else if (this.props.sas.decimal) {
const numberBlocks = this.props.sas.decimal.map((num, i) => <span key={i}> const numberBlocks = this.props.sas.decimal.map((num, i) => <span key={i}>
{num} {num}
@ -76,9 +81,13 @@ 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 ?
"Verify this user by confirming the following number appears on their screen.", _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.",
);
} else { } else {
return <div> return <div>
{_t("Unable to find a supported verification method.")} {_t("Unable to find a supported verification method.")}

View file

@ -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",
"Verify the device by confirming the following emoji appers on its screen.": "Verify the device by confirming the following emoji appers on its 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 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",