From 9ec00f8d9bd998a575d13b08485731cf6dbec507 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Feb 2019 16:01:38 +0000 Subject: [PATCH 1/7] Change text in e2e UX to new copy --- .../keybackup/CreateKeyBackupDialog.js | 68 ++++------ src/components/views/dialogs/LogoutDialog.js | 123 ++++++++++++------ .../views/rooms/RoomRecoveryReminder.js | 57 ++++---- .../views/settings/KeyBackupPanel.js | 62 ++++++--- src/i18n/strings/en_EN.json | 58 +++++---- 5 files changed, 215 insertions(+), 153 deletions(-) diff --git a/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js b/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js index 2c54344a30..d1b57962d6 100644 --- a/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js +++ b/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js @@ -265,8 +265,11 @@ export default React.createClass({ } return
-

{_t("Secure your encrypted message history with a Recovery Passphrase.")}

-

{_t("You'll need it if you log out or lose access to this device.")}

+

{_t( + "We'll store an encrypted copy of your keys on our server. " + + "Protect your backup with a passphrase to keep it secure.", + )}

+

{_t("For maximum security, this should be different from your account password.")}

@@ -291,34 +294,12 @@ export default React.createClass({ disabled={!this._passPhraseIsValid()} /> -

{_t( - "If you don't want encrypted message history to be available on other devices, "+ - ".", - {}, - { - button: sub => - {sub} - , - }, - )}

-

{_t( - "Or, if you don't want to create a Recovery Passphrase, skip this step and "+ - ".", - {}, - { - button: sub => - {sub} - , - }, - )}

+
+ {_t("Advanced")} +

+
; }, @@ -353,9 +334,7 @@ export default React.createClass({ const DialogButtons = sdk.getComponent('views.elements.DialogButtons'); return

{_t( - "Type in your Recovery Passphrase to confirm you remember it. " + - "If it helps, add it to your password manager or store it " + - "somewhere safe.", + "Please type in your passphrase again to check you remember it.", )}

@@ -392,7 +371,13 @@ export default React.createClass({ } return
-

{_t("Make a copy of this Recovery Key and keep it safe.")}

+

{_t( + "Your recovery key is a safety net - you can use it to restore " + + "access to your encrypted messages if you forget your passphrase.", + )}

+

{_t( + "Keep your recovery key somewhere very secure, like a password manager (or a safe)", + )}

{bodyText}

@@ -455,10 +440,9 @@ export default React.createClass({ const DialogButtons = sdk.getComponent('views.elements.DialogButtons'); return

{_t( - "Your encryption keys are now being backed up in the background " + - "to your Homeserver. The initial backup could take several minutes. " + - "You can view key backup upload progress in Settings.")}

- + @@ -484,19 +468,19 @@ export default React.createClass({ _titleForPhase: function(phase) { switch (phase) { case PHASE_PASSPHRASE: - return _t('Create a Recovery Passphrase'); + return _t('Secure your backup with a passphrase'); case PHASE_PASSPHRASE_CONFIRM: - return _t('Confirm Recovery Passphrase'); + return _t('Confirm your passphrase'); case PHASE_OPTOUT_CONFIRM: return _t('Warning!'); case PHASE_SHOWKEY: - return _t('Recovery Key'); + return _t('Recovery key'); case PHASE_KEEPITSAFE: return _t('Keep it safe'); case PHASE_BACKINGUP: return _t('Starting backup...'); case PHASE_DONE: - return _t('Backup Started'); + return _t('Success!'); default: return _t("Create Key Backup"); } diff --git a/src/components/views/dialogs/LogoutDialog.js b/src/components/views/dialogs/LogoutDialog.js index 16b92af1c8..53b9f01da4 100644 --- a/src/components/views/dialogs/LogoutDialog.js +++ b/src/components/views/dialogs/LogoutDialog.js @@ -22,6 +22,10 @@ import { _t } from '../../../languageHandler'; import MatrixClientPeg from '../../../MatrixClientPeg'; export default class LogoutDialog extends React.Component { + defaultProps = { + onFinished: function() {}, + } + constructor() { super(); this._onSettingsLinkClick = this._onSettingsLinkClick.bind(this); @@ -29,13 +33,37 @@ export default class LogoutDialog extends React.Component { this._onFinished = this._onFinished.bind(this); this._onSetRecoveryMethodClick = this._onSetRecoveryMethodClick.bind(this); this._onLogoutConfirm = this._onLogoutConfirm.bind(this); + + this.state = { + loading: false, + backupInfo: null, + error: null, + }; + + if (!MatrixClientPeg.get().getKeyBackupEnabled()) { + this._loadBackupStatus(); + } + } + + async _loadBackupStatus() { + try { + const backupInfo = await MatrixClientPeg.get().getKeyBackupVersion(); + this.setState({ + loading: false, + backupInfo, + }); + } catch (e) { + console.log("Unable to fetch key backup status", e); + this.setState({ + loading: false, + error: e, + }); + } } _onSettingsLinkClick() { // close dialog - if (this.props.onFinished) { - this.props.onFinished(); - } + this.props.onFinished(); } _onExportE2eKeysClicked() { @@ -52,9 +80,7 @@ export default class LogoutDialog extends React.Component { dis.dispatch({action: 'logout'}); } // close dialog - if (this.props.onFinished) { - this.props.onFinished(); - } + this.props.onFinished(); } _onSetRecoveryMethodClick() { @@ -63,72 +89,83 @@ export default class LogoutDialog extends React.Component { ); // close dialog - if (this.props.onFinished) { - this.props.onFinished(); - } + this.props.onFinished(); } _onLogoutConfirm() { dis.dispatch({action: 'logout'}); // close dialog - if (this.props.onFinished) { - this.props.onFinished(); - } + this.props.onFinished(); } render() { const description =

{_t( - "When you log out, you'll lose your secure message history. To prevent " + - "this, set up a recovery method.", - )}

-

{_t( - "Alternatively, advanced users can also manually export encryption keys in " + - "Settings before logging out.", {}, - { - a: sub => {sub}, - }, + "Encrypted messages are secured with end-to-end encryption. " + + "Only you and the recipient(s) have the keys to read these messages.", )}

+

{_t("Back up your keys before signing out to avoid losing them.")}

; if (!MatrixClientPeg.get().getKeyBackupEnabled()) { const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog'); - const DialogButtons = sdk.getComponent('views.elements.DialogButtons'); + + let dialogContent; + if (this.state.loading) { + const Spinner = sdk.getComponent('views.elements.Spinner'); + + dialogContent = ; + } else { + const DialogButtons = sdk.getComponent('views.elements.DialogButtons'); + let setupButtonCaption; + if (this.state.backupInfo) { + setupButtonCaption = _t("Use Key Backup"); + } else { + // if there's an error fetching the backup info, we'll just assume there's + // no backup for the purpose of the button caption + setupButtonCaption = _t("Start using Key Backup"); + } + + dialogContent =
+
+ { description } +
+ + + +
+ {_t("Advanced")} +

+
+
; + } // Not quite a standard question dialog as the primary button cancels // the action and does something else instead, whilst non-default button // confirms the action. return ( -
- { description } -
- - - + {dialogContent}
); } else { const QuestionDialog = sdk.getComponent('views.dialogs.QuestionDialog'); return ( { + this.setState({notNowClicked: true}); + } + onDontAskAgainClick = () => { // When you choose "Don't ask again" from the room reminder, we show a // dialog to confirm the choice. @@ -104,46 +109,54 @@ export default class RoomRecoveryReminder extends React.PureComponent { } render() { - if (this.state.loading) { + // If there was an error loading just don't display the banner: we'll try again + // next time the user switchs to the room. + if (this.state.error || this.state.loading || this.state.notNowClicked) { return null; } const AccessibleButton = sdk.getComponent("views.elements.AccessibleButton"); - let body; - if (this.state.error) { - body =
- {_t("Unable to load key backup status")} -
; - } else if (this.state.backupInfo) { - // A key backup exists for this account, but we're not using it. - body =
-

{_t( - "Secure Key Backup should be active on all of your devices to avoid " + - "losing access to your encrypted messages.", - )}

-
; + let setupCaption; + if (this.state.backupInfo) { + setupCaption = _t("Use Key Backup"); } else { - body = _t( - "Securely back up your decryption keys to the server to make sure " + - "you'll always be able to read your encrypted messages.", - ); + setupCaption = _t("Start using Key Backup"); } return (
{_t( - "Don't risk losing your encrypted messages!", + "Never lose encrypted messages", )}
-
{body}
+
+

{_t( + "Messages in this room are secured with end-to-end " + + "encryption. Only you and the recipient(s) have the " + + "keys to read these messages.", + )}

+

{_t( + "Securely back up your keys to avoid losing them. " + + "Learn more.", {}, + { + // We don't have this link yet: this will prevent the translators + // having to re-translate the string when we do. + a: sub => '', + }, + )}

+
- {_t("Activate Secure Key Backup")} + {setupCaption} +

+ { _t("Not now") } +

- { _t("No thanks, I'll download a copy of my decryption keys before I log out") } + { _t("Don't ask me again") }

diff --git a/src/components/views/settings/KeyBackupPanel.js b/src/components/views/settings/KeyBackupPanel.js index fb870938c7..930e9f38d3 100644 --- a/src/components/views/settings/KeyBackupPanel.js +++ b/src/components/views/settings/KeyBackupPanel.js @@ -111,10 +111,10 @@ export default class KeyBackupPanel extends React.PureComponent { Modal.createTrackedDialog('Delete Backup', '', QuestionDialog, { title: _t('Delete Backup'), description: _t( - "Delete your backed up encryption keys from the server? " + - "You will no longer be able to use your recovery key to read encrypted message history", + "Are you sure? You will lose your encrypted messages if your " + + "keys are not backed up properly." ), - button: _t('Delete backup'), + button: _t('Delete Backup'), danger: true, onFinished: (proceed) => { if (!proceed) return; @@ -135,6 +135,10 @@ export default class KeyBackupPanel extends React.PureComponent { render() { const Spinner = sdk.getComponent("elements.Spinner"); const AccessibleButton = sdk.getComponent("elements.AccessibleButton"); + const encryptedMessageAreEncrypted = _t( + "Encrypted messages are secured with end-to-end encryption. " + + "Only you and the recipient(s) have the keys to read these messages.", + ); if (this.state.error) { return ( @@ -146,13 +150,35 @@ export default class KeyBackupPanel extends React.PureComponent { return ; } else if (this.state.backupInfo) { let clientBackupStatus; + let buttons; + if (MatrixClientPeg.get().getKeyBackupEnabled()) { - clientBackupStatus = _t("This device is using key backup"); + clientBackupStatus =
+

{encryptedMessageAreEncrypted}

+

{_t("This device is backing up your keys. ✅")}

+
; + buttons =

+ + { _t("Restore from Backup") } +     + + { _t("Delete Backup") } + +

; } else { - clientBackupStatus = _t( - "This device is not using key backup. Restore the backup to start using it.", {}, - {b: x => {x}}, - ); + clientBackupStatus =
+

{encryptedMessageAreEncrypted}

+

{_t( + "This device is not backing up your keys.", {}, + {b: x => {x}}, + )}

+

{_t("Back up your keys before signing out to avoid losing them.")}

+
; + buttons =

+ + { _t("Use Key Backup") } + +

; } let uploadStatus; @@ -241,20 +267,20 @@ export default class KeyBackupPanel extends React.PureComponent {
{backupSigStatuses}
{trustedLocally}
-

- - { _t("Restore backup") } -     - - { _t("Delete backup") } - -

+ {buttons}
; } else { return
- {_t("No backup is present")}

+
+

{_t( + "Your keys are not being backed up from this device.", {}, + {b: x => {x}}, + )}

+

{encryptedMessageAreEncrypted}

+

{_t("Back up your keys before signing out to avoid losing them.")}

+
- { _t("Start a new backup") } + { _t("Start using Key Backup") }
; } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 3cc6e71436..a19b8e7cdf 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -439,11 +439,14 @@ "Disable Notifications": "Disable Notifications", "Enable Notifications": "Enable Notifications", "Delete Backup": "Delete Backup", - "Delete your backed up encryption keys from the server? You will no longer be able to use your recovery key to read encrypted message history": "Delete your backed up encryption keys from the server? You will no longer be able to use your recovery key to read encrypted message history", - "Delete backup": "Delete backup", + "Are you sure? You will lose your encrypted messages if your keys are not backed up properly.": "Are you sure? You will lose your encrypted messages if your keys are not backed up properly.", + "Encrypted messages are secured with end-to-end encryption. Only you and the recipient(s) have the keys to read these messages.": "Encrypted messages are secured with end-to-end encryption. Only you and the recipient(s) have the keys to read these messages.", "Unable to load key backup status": "Unable to load key backup status", - "This device is using key backup": "This device is using key backup", - "This device is not using key backup. Restore the backup to start using it.": "This device is not using key backup. Restore the backup to start using it.", + "This device is backing up your keys. ✅": "This device is backing up your keys. ✅", + "Restore from Backup": "Restore from Backup", + "This device is not backing up your keys.": "This device is not backing up your keys.", + "Back up your keys before signing out to avoid losing them.": "Back up your keys before signing out to avoid losing them.", + "Use Key Backup": "Use Key Backup", "Backing up %(sessionsRemaining)s keys...": "Backing up %(sessionsRemaining)s keys...", "All keys backed up": "All keys backed up", "Backup has a signature from unknown device with ID %(deviceId)s.": "Backup has a signature from unknown device with ID %(deviceId)s.", @@ -457,9 +460,8 @@ "Advanced": "Advanced", "Backup version: ": "Backup version: ", "Algorithm: ": "Algorithm: ", - "Restore backup": "Restore backup", - "No backup is present": "No backup is present", - "Start a new backup": "Start a new backup", + "Your keys are not being backed up from this device.": "Your keys are not being backed up from this device.", + "Start using Key Backup": "Start using Key Backup", "Error saving email notification preferences": "Error saving email notification preferences", "An error occurred whilst saving your email notification preferences.": "An error occurred whilst saving your email notification preferences.", "Keywords": "Keywords", @@ -785,11 +787,11 @@ "You are trying to access a room.": "You are trying to access a room.", "Click here to join the discussion!": "Click here to join the discussion!", "This is a preview of this room. Room interactions have been disabled": "This is a preview of this room. Room interactions have been disabled", - "Secure Key Backup should be active on all of your devices to avoid losing access to your encrypted messages.": "Secure Key Backup should be active on all of your devices to avoid losing access to your encrypted messages.", - "Securely back up your decryption keys to the server to make sure you'll always be able to read your encrypted messages.": "Securely back up your decryption keys to the server to make sure you'll always be able to read your encrypted messages.", - "Don't risk losing your encrypted messages!": "Don't risk losing your encrypted messages!", - "Activate Secure Key Backup": "Activate Secure Key Backup", - "No thanks, I'll download a copy of my decryption keys before I log out": "No thanks, I'll download a copy of my decryption keys before I log out", + "Never lose encrypted messages": "Never lose encrypted messages", + "Messages in this room are secured with end-to-end encryption. Only you and the recipient(s) have the keys to read these messages.": "Messages in this room are secured with end-to-end encryption. Only you and the recipient(s) have the keys to read these messages.", + "Securely back up your keys to avoid losing them. Learn more.": "Securely back up your keys to avoid losing them. Learn more.", + "Not now": "Not now", + "Don't ask me again": "Don't ask me again", "Add a topic": "Add a topic", "This room is using an unstable room version. If you aren't expecting this, please upgrade the room.": "This room is using an unstable room version. If you aren't expecting this, please upgrade the room.", "Click here to upgrade to the latest room version.": "Click here to upgrade to the latest room version.", @@ -1101,11 +1103,10 @@ "Clear cache and resync": "Clear cache and resync", "Riot now uses 3-5x less memory, by only loading information about other users when needed. Please wait whilst we resynchronise with the server!": "Riot now uses 3-5x less memory, by only loading information about other users when needed. Please wait whilst we resynchronise with the server!", "Updating Riot": "Updating Riot", - "When you log out, you'll lose your secure message history. To prevent this, set up a recovery method.": "When you log out, you'll lose your secure message history. To prevent this, set up a recovery method.", - "Alternatively, advanced users can also manually export encryption keys in Settings before logging out.": "Alternatively, advanced users can also manually export encryption keys in Settings before logging out.", - "Set a Recovery Method": "Set a Recovery Method", - "I understand, log out without": "I understand, log out without", - "When signing in again, you can access encrypted chat history by restoring your key backup. You'll need your recovery passphrase or, if you didn't set a recovery passphrase, your recovery key (that you downloaded).": "When signing in again, you can access encrypted chat history by restoring your key backup. You'll need your recovery passphrase or, if you didn't set a recovery passphrase, your recovery key (that you downloaded).", + "I don't want my encrypted messages": "I don't want my encrypted messages", + "Manually export keys": "Manually export keys", + "You'll lose access to your encrypted messages": "You'll lose access to your encrypted messages", + "Are you sure you want to sign out?": "Are you sure you want to sign out?", "Thanks for testing the Riot Redesign. If you run into any bugs or visual issues, please let us know on GitHub.": "Thanks for testing the Riot Redesign. If you run into any bugs or visual issues, please let us know on GitHub.", "To help avoid duplicate issues, please view existing issues first (and add a +1) or create a new issue if you can't find it.": "To help avoid duplicate issues, please view existing issues first (and add a +1) or create a new issue if you can't find it.", "Report bugs & give feedback": "Report bugs & give feedback", @@ -1488,19 +1489,19 @@ "Import": "Import", "Great! This passphrase looks strong enough.": "Great! This passphrase looks strong enough.", "Keep going...": "Keep going...", - "Secure your encrypted message history with a Recovery Passphrase.": "Secure your encrypted message history with a Recovery Passphrase.", - "You'll need it if you log out or lose access to this device.": "You'll need it if you log out or lose access to this device.", + "We'll store an encrypted copy of your keys on our server. Protect your backup with a passphrase to keep it secure.": "We'll store an encrypted copy of your keys on our server. Protect your backup with a passphrase to keep it secure.", + "For maximum security, this should be different from your account password.": "For maximum security, this should be different from your account password.", "Enter a passphrase...": "Enter a passphrase...", - "If you don't want encrypted message history to be available on other devices, .": "If you don't want encrypted message history to be available on other devices, .", - "Or, if you don't want to create a Recovery Passphrase, skip this step and .": "Or, if you don't want to create a Recovery Passphrase, skip this step and .", + "Set up with a Recovery Key": "Set up with a Recovery Key", "That matches!": "That matches!", "That doesn't match.": "That doesn't match.", "Go back to set it again.": "Go back to set it again.", - "Type in your Recovery Passphrase to confirm you remember it. If it helps, add it to your password manager or store it somewhere safe.": "Type in your Recovery Passphrase to confirm you remember it. If it helps, add it to your password manager or store it somewhere safe.", + "Please type in your passphrase again to check you remember it.": "Please type in your passphrase again to check you remember it.", "Repeat your passphrase...": "Repeat your passphrase...", "As a safety net, you can use it to restore your encrypted message history if you forget your Recovery Passphrase.": "As a safety net, you can use it to restore your encrypted message history if you forget your Recovery Passphrase.", "As a safety net, you can use it to restore your encrypted message history.": "As a safety net, you can use it to restore your encrypted message history.", - "Make a copy of this Recovery Key and keep it safe.": "Make a copy of this Recovery Key and keep it safe.", + "Your recovery key is a safety net - you can use it to restore access to your encrypted messages if you forget your passphrase.": "Your recovery key is a safety net - you can use it to restore access to your encrypted messages if you forget your passphrase.", + "Keep your recovery key somewhere very secure, like a password manager (or a safe)": "Keep your recovery key somewhere very secure, like a password manager (or a safe)", "Your Recovery Key": "Your Recovery Key", "Copy to clipboard": "Copy to clipboard", "Download": "Download", @@ -1509,15 +1510,16 @@ "Print it and store it somewhere safe": "Print it and store it somewhere safe", "Save it on a USB key or backup drive": "Save it on a USB key or backup drive", "Copy it to your personal cloud storage": "Copy it to your personal cloud storage", - "Your encryption keys are now being backed up in the background to your Homeserver. The initial backup could take several minutes. You can view key backup upload progress in Settings.": "Your encryption keys are now being backed up in the background to your Homeserver. The initial backup could take several minutes. You can view key backup upload progress in Settings.", + "Your keys are being backed up (the first backup could take a few minutes).": "Your keys are being backed up (the first backup could take a few minutes).", + "Okay": "Okay", "Without setting up Secure Message Recovery, you won't be able to restore your encrypted message history if you log out or use another device.": "Without setting up Secure Message Recovery, you won't be able to restore your encrypted message history if you log out or use another device.", "Set up Secure Message Recovery": "Set up Secure Message Recovery", - "Create a Recovery Passphrase": "Create a Recovery Passphrase", - "Confirm Recovery Passphrase": "Confirm Recovery Passphrase", - "Recovery Key": "Recovery Key", + "Secure your backup with a passphrase": "Secure your backup with a passphrase", + "Confirm your passphrase": "Confirm your passphrase", + "Recovery key": "Recovery key", "Keep it safe": "Keep it safe", "Starting backup...": "Starting backup...", - "Backup Started": "Backup Started", + "Success!": "Success!", "Create Key Backup": "Create Key Backup", "Unable to create key backup": "Unable to create key backup", "Retry": "Retry", From 3a0b8cb169726b629741fd149579757b91cab973 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Feb 2019 16:03:46 +0000 Subject: [PATCH 2/7] Lint --- .../views/dialogs/keybackup/CreateKeyBackupDialog.js | 1 - src/components/views/settings/KeyBackupPanel.js | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js b/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js index d1b57962d6..eef4339a28 100644 --- a/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js +++ b/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js @@ -240,7 +240,6 @@ export default React.createClass({ _renderPhasePassPhrase: function() { const DialogButtons = sdk.getComponent('views.elements.DialogButtons'); - const AccessibleButton = sdk.getComponent('elements.AccessibleButton'); let strengthMeter; let helpText; diff --git a/src/components/views/settings/KeyBackupPanel.js b/src/components/views/settings/KeyBackupPanel.js index 930e9f38d3..a2de6d6519 100644 --- a/src/components/views/settings/KeyBackupPanel.js +++ b/src/components/views/settings/KeyBackupPanel.js @@ -111,8 +111,8 @@ export default class KeyBackupPanel extends React.PureComponent { Modal.createTrackedDialog('Delete Backup', '', QuestionDialog, { title: _t('Delete Backup'), description: _t( - "Are you sure? You will lose your encrypted messages if your " + - "keys are not backed up properly." + "Are you sure? You will lose your encrypted messages if your " + + "keys are not backed up properly.", ), button: _t('Delete Backup'), danger: true, From e41fc55cca7436ee8831551125f8895d62f60665 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Feb 2019 16:34:06 +0000 Subject: [PATCH 3/7] Add warnings about trusted computers --- .../dialogs/keybackup/CreateKeyBackupDialog.js | 4 ++++ .../keybackup/RestoreKeyBackupDialog.js | 18 ++++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js b/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js index eef4339a28..82bd3786cc 100644 --- a/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js +++ b/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js @@ -264,6 +264,10 @@ export default React.createClass({ } return
+

{_t( + "Warning: you should only set up key backup from a trusted computer.", {}, + { b: sub => {sub} }, + )}

{_t( "We'll store an encrypted copy of your keys on our server. " + "Protect your backup with a passphrase to keep it secure.", diff --git a/src/components/views/dialogs/keybackup/RestoreKeyBackupDialog.js b/src/components/views/dialogs/keybackup/RestoreKeyBackupDialog.js index 712d8d2b4e..0f390a02c9 100644 --- a/src/components/views/dialogs/keybackup/RestoreKeyBackupDialog.js +++ b/src/components/views/dialogs/keybackup/RestoreKeyBackupDialog.js @@ -230,10 +230,15 @@ export default React.createClass({ const AccessibleButton = sdk.getComponent('elements.AccessibleButton'); title = _t("Enter Recovery Passphrase"); content =

- {_t( +

{_t( + "Warning: you should only set up key backup " + + "from a trusted computer.", {}, + { b: sub => {sub} }, + )}

+

{_t( "Access your secure message history and set up secure " + "messaging by entering your recovery passphrase.", - )}
+ )}

- {_t( +

{_t( + "Warning: you should only set up key backup " + + "from a trusted computer.", {}, + { b: sub => {sub} }, + )}

+

{_t( "Access your secure message history and set up secure " + "messaging by entering your recovery key.", - )}
+ )}

Date: Tue, 12 Feb 2019 17:53:00 +0000 Subject: [PATCH 4/7] flag todo --- src/components/views/rooms/RoomRecoveryReminder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/rooms/RoomRecoveryReminder.js b/src/components/views/rooms/RoomRecoveryReminder.js index 020a91012c..12fc78be4e 100644 --- a/src/components/views/rooms/RoomRecoveryReminder.js +++ b/src/components/views/rooms/RoomRecoveryReminder.js @@ -139,7 +139,7 @@ export default class RoomRecoveryReminder extends React.PureComponent { "Securely back up your keys to avoid losing them. " + "Learn more.", {}, { - // We don't have this link yet: this will prevent the translators + // TODO: We don't have this link yet: this will prevent the translators // having to re-translate the string when we do. a: sub => '', }, From 2c5da21adb8fa28bbe10e09d0413b161dc7d1e70 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Feb 2019 18:06:36 +0000 Subject: [PATCH 5/7] KeyBackupPanel fixes * Separate out the emoji from the translateable string * Put back the delete button if you're not using the backup, otherwise you're stuck unable to use key backup at all if you lost your recovery secret and the device you set it up on. --- .../views/settings/KeyBackupPanel.js | 28 ++++++++----------- src/i18n/strings/en_EN.json | 6 ++-- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/src/components/views/settings/KeyBackupPanel.js b/src/components/views/settings/KeyBackupPanel.js index a2de6d6519..0f0ec997be 100644 --- a/src/components/views/settings/KeyBackupPanel.js +++ b/src/components/views/settings/KeyBackupPanel.js @@ -149,22 +149,15 @@ export default class KeyBackupPanel extends React.PureComponent { } else if (this.state.loading) { return ; } else if (this.state.backupInfo) { + const EmojiText = sdk.getComponent('elements.EmojiText'); let clientBackupStatus; - let buttons; + let restoreButtonCaption = _t("Restore from Backup"); if (MatrixClientPeg.get().getKeyBackupEnabled()) { clientBackupStatus =

{encryptedMessageAreEncrypted}

-

{_t("This device is backing up your keys. ✅")}

+

{_t("This device is backing up your keys. ")}

; - buttons =

- - { _t("Restore from Backup") } -     - - { _t("Delete Backup") } - -

; } else { clientBackupStatus =

{encryptedMessageAreEncrypted}

@@ -174,11 +167,7 @@ export default class KeyBackupPanel extends React.PureComponent { )}

{_t("Back up your keys before signing out to avoid losing them.")}

; - buttons =

- - { _t("Use Key Backup") } - -

; + restoreButtonCaption = _t("Use key backup"); } let uploadStatus; @@ -267,7 +256,14 @@ export default class KeyBackupPanel extends React.PureComponent {
{backupSigStatuses}
{trustedLocally}
- {buttons} +

+ + {restoreButtonCaption} +     + + { _t("Delete Backup") } + +

; } else { return
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index a19b8e7cdf..8854019737 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -442,11 +442,11 @@ "Are you sure? You will lose your encrypted messages if your keys are not backed up properly.": "Are you sure? You will lose your encrypted messages if your keys are not backed up properly.", "Encrypted messages are secured with end-to-end encryption. Only you and the recipient(s) have the keys to read these messages.": "Encrypted messages are secured with end-to-end encryption. Only you and the recipient(s) have the keys to read these messages.", "Unable to load key backup status": "Unable to load key backup status", - "This device is backing up your keys. ✅": "This device is backing up your keys. ✅", "Restore from Backup": "Restore from Backup", + "This device is backing up your keys. ": "This device is backing up your keys. ", "This device is not backing up your keys.": "This device is not backing up your keys.", "Back up your keys before signing out to avoid losing them.": "Back up your keys before signing out to avoid losing them.", - "Use Key Backup": "Use Key Backup", + "Use key backup": "Use key backup", "Backing up %(sessionsRemaining)s keys...": "Backing up %(sessionsRemaining)s keys...", "All keys backed up": "All keys backed up", "Backup has a signature from unknown device with ID %(deviceId)s.": "Backup has a signature from unknown device with ID %(deviceId)s.", @@ -787,6 +787,7 @@ "You are trying to access a room.": "You are trying to access a room.", "Click here to join the discussion!": "Click here to join the discussion!", "This is a preview of this room. Room interactions have been disabled": "This is a preview of this room. Room interactions have been disabled", + "Use Key Backup": "Use Key Backup", "Never lose encrypted messages": "Never lose encrypted messages", "Messages in this room are secured with end-to-end encryption. Only you and the recipient(s) have the keys to read these messages.": "Messages in this room are secured with end-to-end encryption. Only you and the recipient(s) have the keys to read these messages.", "Securely back up your keys to avoid losing them. Learn more.": "Securely back up your keys to avoid losing them. Learn more.", @@ -1173,6 +1174,7 @@ "Failed to decrypt %(failedCount)s sessions!": "Failed to decrypt %(failedCount)s sessions!", "Restored %(sessionCount)s session keys": "Restored %(sessionCount)s session keys", "Enter Recovery Passphrase": "Enter Recovery Passphrase", + "Warning: you should only set up key backup from a trusted computer.": "Warning: you should only set up key backup from a trusted computer.", "Access your secure message history and set up secure messaging by entering your recovery passphrase.": "Access your secure message history and set up secure messaging by entering your recovery passphrase.", "Next": "Next", "If you've forgotten your recovery passphrase you can use your recovery key or set up new recovery options": "If you've forgotten your recovery passphrase you can use your recovery key or set up new recovery options", From dbd2f3daa28d3673a097acb73d389062f10649d7 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Feb 2019 18:08:16 +0000 Subject: [PATCH 6/7] Use sub for substitution variable name --- src/components/views/settings/KeyBackupPanel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/settings/KeyBackupPanel.js b/src/components/views/settings/KeyBackupPanel.js index 0f0ec997be..3976196b57 100644 --- a/src/components/views/settings/KeyBackupPanel.js +++ b/src/components/views/settings/KeyBackupPanel.js @@ -163,7 +163,7 @@ export default class KeyBackupPanel extends React.PureComponent {

{encryptedMessageAreEncrypted}

{_t( "This device is not backing up your keys.", {}, - {b: x => {x}}, + {b: sub => {sub}}, )}

{_t("Back up your keys before signing out to avoid losing them.")}

; @@ -270,7 +270,7 @@ export default class KeyBackupPanel extends React.PureComponent {

{_t( "Your keys are not being backed up from this device.", {}, - {b: x => {x}}, + {b: sub => {sub}}, )}

{encryptedMessageAreEncrypted}

{_t("Back up your keys before signing out to avoid losing them.")}

From 2eaba22d63de53ed7c4691afd3a51e4859d14896 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Feb 2019 20:14:43 +0000 Subject: [PATCH 7/7] Better passphase confirm text --- .../views/dialogs/keybackup/CreateKeyBackupDialog.js | 2 +- src/i18n/strings/en_EN.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js b/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js index 82bd3786cc..9ceff69467 100644 --- a/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js +++ b/src/async-components/views/dialogs/keybackup/CreateKeyBackupDialog.js @@ -337,7 +337,7 @@ export default React.createClass({ const DialogButtons = sdk.getComponent('views.elements.DialogButtons'); return

{_t( - "Please type in your passphrase again to check you remember it.", + "Please enter your passphrase a second time to confirm.", )}

diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 8854019737..def08110a1 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1498,7 +1498,7 @@ "That matches!": "That matches!", "That doesn't match.": "That doesn't match.", "Go back to set it again.": "Go back to set it again.", - "Please type in your passphrase again to check you remember it.": "Please type in your passphrase again to check you remember it.", + "Please enter your passphrase a second time to confirm.": "Please enter your passphrase a second time to confirm.", "Repeat your passphrase...": "Repeat your passphrase...", "As a safety net, you can use it to restore your encrypted message history if you forget your Recovery Passphrase.": "As a safety net, you can use it to restore your encrypted message history if you forget your Recovery Passphrase.", "As a safety net, you can use it to restore your encrypted message history.": "As a safety net, you can use it to restore your encrypted message history.",