diff --git a/src/components/views/dialogs/UntrustedDeviceDialog.tsx b/src/components/views/dialogs/UntrustedDeviceDialog.tsx index 1a1607c5f4..b1a35d965b 100644 --- a/src/components/views/dialogs/UntrustedDeviceDialog.tsx +++ b/src/components/views/dialogs/UntrustedDeviceDialog.tsx @@ -47,7 +47,7 @@ const UntrustedDeviceDialog: React.FC = ({ device, user, onFinished }) = onFinished={onFinished} className="mx_UntrustedDeviceDialog" title={<> - + { _t("Not Trusted") } } > diff --git a/src/components/views/right_panel/VerificationPanel.tsx b/src/components/views/right_panel/VerificationPanel.tsx index 3ed2dc3a3d..d4caf80a29 100644 --- a/src/components/views/right_panel/VerificationPanel.tsx +++ b/src/components/views/right_panel/VerificationPanel.tsx @@ -189,7 +189,7 @@ export default class VerificationPanel extends React.PureComponent

{ description }

- +

{ _t("Verified") }

{ description }

- + { text ?

{ text }

: null } { _t("Got it") } diff --git a/src/components/views/rooms/E2EIcon.tsx b/src/components/views/rooms/E2EIcon.tsx index 2489eb38a4..15025ea64c 100644 --- a/src/components/views/rooms/E2EIcon.tsx +++ b/src/components/views/rooms/E2EIcon.tsx @@ -24,22 +24,22 @@ import Tooltip from "../elements/Tooltip"; import { E2EStatus } from "../../../utils/ShieldUtils"; export enum E2E_STATE { - VERIFIED = "verified", - WARNING = "warning", - UNKNOWN = "unknown", - NORMAL = "normal", - UNAUTHENTICATED = "unauthenticated", + Verified = "verified", + Warning = "warning", + Unknown = "unknown", + Normal = "normal", + Unauthenticated = "unauthenticated", } const crossSigningUserTitles: { [key in E2E_STATE]?: string } = { - [E2E_STATE.WARNING]: _td("This user has not verified all of their sessions."), - [E2E_STATE.NORMAL]: _td("You have not verified this user."), - [E2E_STATE.VERIFIED]: _td("You have verified this user. This user has verified all of their sessions."), + [E2E_STATE.Warning]: _td("This user has not verified all of their sessions."), + [E2E_STATE.Normal]: _td("You have not verified this user."), + [E2E_STATE.Verified]: _td("You have verified this user. This user has verified all of their sessions."), }; const crossSigningRoomTitles: { [key in E2E_STATE]?: string } = { - [E2E_STATE.WARNING]: _td("Someone is using an unknown session"), - [E2E_STATE.NORMAL]: _td("This room is end-to-end encrypted"), - [E2E_STATE.VERIFIED]: _td("Everyone in this room is verified"), + [E2E_STATE.Warning]: _td("Someone is using an unknown session"), + [E2E_STATE.Normal]: _td("This room is end-to-end encrypted"), + [E2E_STATE.Verified]: _td("Everyone in this room is verified"), }; interface IProps { @@ -58,9 +58,9 @@ const E2EIcon: React.FC = ({ isUser, status, className, size, onClick, h const classes = classNames({ mx_E2EIcon: true, mx_E2EIcon_bordered: bordered, - mx_E2EIcon_warning: status === E2E_STATE.WARNING, - mx_E2EIcon_normal: status === E2E_STATE.NORMAL, - mx_E2EIcon_verified: status === E2E_STATE.VERIFIED, + mx_E2EIcon_warning: status === E2E_STATE.Warning, + mx_E2EIcon_normal: status === E2E_STATE.Normal, + mx_E2EIcon_verified: status === E2E_STATE.Verified, }, className); let e2eTitle; diff --git a/src/components/views/rooms/EventTile.tsx b/src/components/views/rooms/EventTile.tsx index 5d8c083390..6b7a7f7281 100644 --- a/src/components/views/rooms/EventTile.tsx +++ b/src/components/views/rooms/EventTile.tsx @@ -605,7 +605,7 @@ export default class EventTile extends React.Component { if (encryptionInfo.mismatchedSender) { // something definitely wrong is going on here this.setState({ - verified: E2E_STATE.WARNING, + verified: E2E_STATE.Warning, }, this.props.onHeightChanged); // Decryption may have caused a change in size return; } @@ -613,7 +613,7 @@ export default class EventTile extends React.Component { if (!userTrust.isCrossSigningVerified()) { // user is not verified, so default to everything is normal this.setState({ - verified: E2E_STATE.NORMAL, + verified: E2E_STATE.Normal, }, this.props.onHeightChanged); // Decryption may have caused a change in size return; } @@ -623,27 +623,27 @@ export default class EventTile extends React.Component { ); if (!eventSenderTrust) { this.setState({ - verified: E2E_STATE.UNKNOWN, + verified: E2E_STATE.Unknown, }, this.props.onHeightChanged); // Decryption may have caused a change in size return; } if (!eventSenderTrust.isVerified()) { this.setState({ - verified: E2E_STATE.WARNING, + verified: E2E_STATE.Warning, }, this.props.onHeightChanged); // Decryption may have caused a change in size return; } if (!encryptionInfo.authenticated) { this.setState({ - verified: E2E_STATE.UNAUTHENTICATED, + verified: E2E_STATE.Unauthenticated, }, this.props.onHeightChanged); // Decryption may have caused a change in size return; } this.setState({ - verified: E2E_STATE.VERIFIED, + verified: E2E_STATE.Verified, }, this.props.onHeightChanged); // Decryption may have caused a change in size } @@ -850,13 +850,13 @@ export default class EventTile extends React.Component { // event is encrypted, display padlock corresponding to whether or not it is verified if (ev.isEncrypted()) { - if (this.state.verified === E2E_STATE.NORMAL) { + if (this.state.verified === E2E_STATE.Normal) { return; // no icon if we've not even cross-signed the user - } else if (this.state.verified === E2E_STATE.VERIFIED) { + } else if (this.state.verified === E2E_STATE.Verified) { return; // no icon for verified - } else if (this.state.verified === E2E_STATE.UNAUTHENTICATED) { + } else if (this.state.verified === E2E_STATE.Unauthenticated) { return (); - } else if (this.state.verified === E2E_STATE.UNKNOWN) { + } else if (this.state.verified === E2E_STATE.Unknown) { return (); } else { return (); @@ -961,9 +961,9 @@ export default class EventTile extends React.Component { mx_EventTile_lastInSection: this.props.lastInSection, mx_EventTile_contextual: this.props.contextual, mx_EventTile_actionBarFocused: this.state.actionBarFocused, - mx_EventTile_verified: !isBubbleMessage && this.state.verified === E2E_STATE.VERIFIED, - mx_EventTile_unverified: !isBubbleMessage && this.state.verified === E2E_STATE.WARNING, - mx_EventTile_unknown: !isBubbleMessage && this.state.verified === E2E_STATE.UNKNOWN, + mx_EventTile_verified: !isBubbleMessage && this.state.verified === E2E_STATE.Verified, + mx_EventTile_unverified: !isBubbleMessage && this.state.verified === E2E_STATE.Warning, + mx_EventTile_unknown: !isBubbleMessage && this.state.verified === E2E_STATE.Unknown, mx_EventTile_bad: isEncryptionFailure, mx_EventTile_emote: msgtype === 'm.emote', mx_EventTile_noSender: this.props.hideSender,