mirror of https://github.com/vector-im/riot-web
adjust copy for self-verification in verification panel
parent
030d594e67
commit
cdbd4da0e4
|
@ -18,7 +18,6 @@ import React from "react";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
import * as sdk from '../../../index';
|
import * as sdk from '../../../index';
|
||||||
import {MatrixClientPeg} from '../../../MatrixClientPeg';
|
|
||||||
import {verificationMethods} from 'matrix-js-sdk/src/crypto';
|
import {verificationMethods} from 'matrix-js-sdk/src/crypto';
|
||||||
import {SCAN_QR_CODE_METHOD} from "matrix-js-sdk/src/crypto/verification/QRCode";
|
import {SCAN_QR_CODE_METHOD} from "matrix-js-sdk/src/crypto/verification/QRCode";
|
||||||
|
|
||||||
|
@ -200,13 +199,15 @@ export default class VerificationPanel extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
renderVerifiedPhase() {
|
renderVerifiedPhase() {
|
||||||
const {member} = this.props;
|
const {member, request} = this.props;
|
||||||
|
|
||||||
let text;
|
let text;
|
||||||
if (this.props.isRoomEncrypted) {
|
if (!request.isSelfVerification) {
|
||||||
text = _t("Verify all users in a room to ensure it's secure.");
|
if (this.props.isRoomEncrypted) {
|
||||||
} else {
|
text = _t("Verify all users in a room to ensure it's secure.");
|
||||||
text = _t("In encrypted rooms, verify all users to ensure it’s secure.");
|
} else {
|
||||||
|
text = _t("In encrypted rooms, verify all users to ensure it’s secure.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
|
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
|
||||||
|
@ -224,8 +225,7 @@ export default class VerificationPanel extends React.PureComponent {
|
||||||
<h3>{_t("Verified")}</h3>
|
<h3>{_t("Verified")}</h3>
|
||||||
<p>{description}</p>
|
<p>{description}</p>
|
||||||
<E2EIcon isUser={true} status="verified" size={128} hideTooltip={true} />
|
<E2EIcon isUser={true} status="verified" size={128} hideTooltip={true} />
|
||||||
<p>{ text }</p>
|
{ text ? <p>{ text }</p> : null }
|
||||||
|
|
||||||
<AccessibleButton kind="primary" className="mx_UserInfo_wideButton" onClick={this.props.onClose}>
|
<AccessibleButton kind="primary" className="mx_UserInfo_wideButton" onClick={this.props.onClose}>
|
||||||
{_t("Got it")}
|
{_t("Got it")}
|
||||||
</AccessibleButton>
|
</AccessibleButton>
|
||||||
|
@ -238,15 +238,27 @@ export default class VerificationPanel extends React.PureComponent {
|
||||||
|
|
||||||
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
|
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
|
||||||
|
|
||||||
|
let startAgainInstruction;
|
||||||
|
if (request.isSelfVerification) {
|
||||||
|
startAgainInstruction = _t("Start verification again from the notification.");
|
||||||
|
} else {
|
||||||
|
startAgainInstruction = _t("Start verification again from their profile.");
|
||||||
|
}
|
||||||
|
|
||||||
let text;
|
let text;
|
||||||
if (request.cancellationCode === "m.timeout") {
|
if (request.cancellationCode === "m.timeout") {
|
||||||
text = _t("Verification timed out. Start verification again from their profile.");
|
text = _t("Verification timed out.") + ` ${startAgainInstruction}`;
|
||||||
} else if (request.cancellingUserId === request.otherUserId) {
|
} else if (request.cancellingUserId === request.otherUserId) {
|
||||||
text = _t("%(displayName)s cancelled verification. Start verification again from their profile.", {
|
if (request.isSelfVerification) {
|
||||||
displayName: member.displayName || member.name || member.userId,
|
text = _t("You cancelled verification on your other session.");
|
||||||
});
|
} else {
|
||||||
|
text = _t("%(displayName)s cancelled verification.", {
|
||||||
|
displayName: member.displayName || member.name || member.userId,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
text = `${text} ${startAgainInstruction}`;
|
||||||
} else {
|
} else {
|
||||||
text = _t("You cancelled verification. Start verification again from their profile.");
|
text = _t("You cancelled verification.") + ` ${startAgainInstruction}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue