From 4a883f2e88357b99c8339bbf85f4f5b7848cd8e5 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 26 Mar 2021 11:13:39 +0000 Subject: [PATCH] Tweak cross-signing copy This makes some Design-approved copy tweaks to the recent cross-signing flow changes. --- res/css/structures/_ToastContainer.scss | 6 +++++- src/components/structures/MatrixChat.tsx | 2 +- .../structures/auth/SetupEncryptionBody.js | 9 ++++----- .../views/dialogs/VerificationRequestDialog.js | 2 +- .../views/right_panel/EncryptionInfo.tsx | 2 +- src/components/views/toasts/GenericToast.tsx | 10 ++++++++-- .../views/toasts/VerificationRequestToast.tsx | 18 ++++++++++-------- src/i18n/strings/en_EN.json | 17 ++++++++--------- src/toasts/BulkUnverifiedSessionsToast.ts | 2 +- src/toasts/UnverifiedSessionToast.ts | 12 +++++------- 10 files changed, 44 insertions(+), 36 deletions(-) diff --git a/res/css/structures/_ToastContainer.scss b/res/css/structures/_ToastContainer.scss index c381668a6a..09f834a6e3 100644 --- a/res/css/structures/_ToastContainer.scss +++ b/res/css/structures/_ToastContainer.scss @@ -1,5 +1,5 @@ /* -Copyright 2019 The Matrix.org Foundation C.I.C. +Copyright 2019-2021 The Matrix.org Foundation C.I.C. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -158,6 +158,10 @@ limitations under the License. } } + .mx_Toast_detail { + color: $secondary-fg-color; + } + .mx_Toast_deviceID { font-size: $font-10px; } diff --git a/src/components/structures/MatrixChat.tsx b/src/components/structures/MatrixChat.tsx index ac1842c7fd..fda4616b48 100644 --- a/src/components/structures/MatrixChat.tsx +++ b/src/components/structures/MatrixChat.tsx @@ -1556,7 +1556,7 @@ export default class MatrixChat extends React.PureComponent { } else if (request.pending) { ToastStore.sharedInstance().addOrReplaceToast({ key: 'verifreq_' + request.channel.transactionId, - title: request.isSelfVerification ? _t("Self-verification request") : _t("Verification Request"), + title: _t("Verification requested"), icon: "verification", props: {request}, component: sdk.getComponent("toasts.VerificationRequestToast"), diff --git a/src/components/structures/auth/SetupEncryptionBody.js b/src/components/structures/auth/SetupEncryptionBody.js index e246b9cbd0..803df19d00 100644 --- a/src/components/structures/auth/SetupEncryptionBody.js +++ b/src/components/structures/auth/SetupEncryptionBody.js @@ -155,15 +155,14 @@ export default class SetupEncryptionBody extends React.Component { let verifyButton; if (store.hasDevicesToVerifyAgainst) { verifyButton = - { _t("Verify with another session") } + { _t("Use another login") } ; } return (

{_t( - "Verify this login to access your encrypted messages and " + - "prove to others that this login is really you.", + "Verify your identity to access encrypted messages and prove your identity to others.", )}

@@ -205,8 +204,8 @@ export default class SetupEncryptionBody extends React.Component { return (

{_t( - "Without completing security on this session, it won’t have " + - "access to encrypted messages.", + "Without verifying, you won’t have access to all your messages " + + "and may appear as untrusted to others.", )}

= ({ let text: string; if (waitingForOtherParty) { if (isSelfVerification) { - text = _t("Waiting for you to accept on your other session…"); + text = _t("Accept on your other login…"); } else { text = _t("Waiting for %(displayName)s to accept…", { displayName: member.displayName || member.name || member.userId, diff --git a/src/components/views/toasts/GenericToast.tsx b/src/components/views/toasts/GenericToast.tsx index a9c64f1962..200c88875e 100644 --- a/src/components/views/toasts/GenericToast.tsx +++ b/src/components/views/toasts/GenericToast.tsx @@ -1,5 +1,5 @@ /* -Copyright 2020 The Matrix.org Foundation C.I.C. +Copyright 2020-2021 The Matrix.org Foundation C.I.C. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ import {XOR} from "../../../@types/common"; export interface IProps { description: ReactNode; + detail?: ReactNode; acceptLabel: string; onAccept(); @@ -33,14 +34,19 @@ interface IPropsExtended extends IProps { const GenericToast: React.FC> = ({ description, + detail, acceptLabel, rejectLabel, onAccept, onReject, }) => { + const detailContent = detail ? + {detail} + : null; + return
- { description } + {description} {detailContent}
{onReject && rejectLabel && } diff --git a/src/components/views/toasts/VerificationRequestToast.tsx b/src/components/views/toasts/VerificationRequestToast.tsx index d3da282c1c..56be23aa7e 100644 --- a/src/components/views/toasts/VerificationRequestToast.tsx +++ b/src/components/views/toasts/VerificationRequestToast.tsx @@ -1,5 +1,5 @@ /* -Copyright 2019 The Matrix.org Foundation C.I.C. +Copyright 2019-2021 The Matrix.org Foundation C.I.C. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -140,11 +140,12 @@ export default class VerificationRequestToast extends React.PureComponentrequests.": "Your server isn't responding to some requests.", - "From %(deviceName)s (%(deviceId)s) at %(ip)s": "From %(deviceName)s (%(deviceId)s) at %(ip)s", "Decline (%(counter)s)": "Decline (%(counter)s)", "Accept to continue:": "Accept to continue:", "Delete": "Delete", @@ -1674,7 +1673,7 @@ "In encrypted rooms, like this one, URL previews are disabled by default to ensure that your homeserver (where the previews are generated) cannot gather information about links you see in this room.": "In encrypted rooms, like this one, URL previews are disabled by default to ensure that your homeserver (where the previews are generated) cannot gather information about links you see in this room.", "When someone puts a URL in their message, a URL preview can be shown to give more information about that link such as the title, description, and an image from the website.": "When someone puts a URL in their message, a URL preview can be shown to give more information about that link such as the title, description, and an image from the website.", "Back": "Back", - "Waiting for you to accept on your other session…": "Waiting for you to accept on your other session…", + "Accept on your other login…": "Accept on your other login…", "Waiting for %(displayName)s to accept…": "Waiting for %(displayName)s to accept…", "Accepting…": "Accepting…", "Start Verification": "Start Verification", @@ -2348,7 +2347,7 @@ "Upload %(count)s other files|one": "Upload %(count)s other file", "Cancel All": "Cancel All", "Upload Error": "Upload Error", - "Verify other session": "Verify other session", + "Verify other login": "Verify other login", "Verification Request": "Verification Request", "Approve widget permissions": "Approve widget permissions", "This widget would like to:": "This widget would like to:", @@ -2549,7 +2548,7 @@ "Review terms and conditions": "Review terms and conditions", "Old cryptography data detected": "Old cryptography data detected", "Data from an older version of %(brand)s has been detected. This will have caused end-to-end cryptography to malfunction in the older version. End-to-end encrypted messages exchanged recently whilst using the older version may not be decryptable in this version. This may also cause messages exchanged with this version to fail. If you experience problems, log out and back in again. To retain message history, export and re-import your keys.": "Data from an older version of %(brand)s has been detected. This will have caused end-to-end cryptography to malfunction in the older version. End-to-end encrypted messages exchanged recently whilst using the older version may not be decryptable in this version. This may also cause messages exchanged with this version to fail. If you experience problems, log out and back in again. To retain message history, export and re-import your keys.", - "Self-verification request": "Self-verification request", + "Verification requested": "Verification requested", "Logout": "Logout", "%(creator)s created this DM.": "%(creator)s created this DM.", "%(creator)s created and configured the room.": "%(creator)s created and configured the room.", @@ -2739,11 +2738,11 @@ "Decide where your account is hosted": "Decide where your account is hosted", "Use Security Key or Phrase": "Use Security Key or Phrase", "Use Security Key": "Use Security Key", - "Verify with another session": "Verify with another session", - "Verify this login to access your encrypted messages and prove to others that this login is really you.": "Verify this login to access your encrypted messages and prove to others that this login is really you.", + "Use another login": "Use another login", + "Verify your identity to access encrypted messages and prove your identity to others.": "Verify your identity to access encrypted messages and prove your identity to others.", "Your new session is now verified. It has access to your encrypted messages, and other users will see it as trusted.": "Your new session is now verified. It has access to your encrypted messages, and other users will see it as trusted.", "Your new session is now verified. Other users will see it as trusted.": "Your new session is now verified. Other users will see it as trusted.", - "Without completing security on this session, it won’t have access to encrypted messages.": "Without completing security on this session, it won’t have access to encrypted messages.", + "Without verifying, you won’t have access to all your messages and may appear as untrusted to others.": "Without verifying, you won’t have access to all your messages and may appear as untrusted to others.", "Failed to re-authenticate due to a homeserver problem": "Failed to re-authenticate due to a homeserver problem", "Incorrect password": "Incorrect password", "Failed to re-authenticate": "Failed to re-authenticate", diff --git a/src/toasts/BulkUnverifiedSessionsToast.ts b/src/toasts/BulkUnverifiedSessionsToast.ts index bc129ebd54..e063f72fe0 100644 --- a/src/toasts/BulkUnverifiedSessionsToast.ts +++ b/src/toasts/BulkUnverifiedSessionsToast.ts @@ -42,7 +42,7 @@ export const showToast = (deviceIds: Set) => { title: _t("You have unverified logins"), icon: "verification_warning", props: { - description: _t("Verify all your sessions to ensure your account & messages are safe"), + description: _t("Review to ensure your account is safe"), acceptLabel: _t("Review"), onAccept, rejectLabel: _t("Later"), diff --git a/src/toasts/UnverifiedSessionToast.ts b/src/toasts/UnverifiedSessionToast.ts index e0ea323033..c856d39d1f 100644 --- a/src/toasts/UnverifiedSessionToast.ts +++ b/src/toasts/UnverifiedSessionToast.ts @@ -49,13 +49,11 @@ export const showToast = async (deviceId: string) => { title: _t("New login. Was this you?"), icon: "verification_warning", props: { - description: _t( - "A new login is accessing your account: %(name)s (%(deviceID)s) at %(ip)s", { - name: device.display_name, - deviceID: deviceId, - ip: device.last_seen_ip, - }, - ), + description: device.display_name, + detail: _t("%(deviceId)s from %(ip)s", { + deviceId, + ip: device.last_seen_ip, + }), acceptLabel: _t("Check your devices"), onAccept, rejectLabel: _t("Later"),