From a93c13306cb98fb69caf85242056258faab27b53 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 28 Feb 2020 11:25:04 +0000 Subject: [PATCH 1/3] Prefer account password variation of upgrading This shows the account password variation of upgrade encryption first if it's possible to do so. This ensures we match the logic that locks the next button. Fixes https://github.com/vector-im/riot-web/issues/12560 --- .../secretstorage/CreateSecretStorageDialog.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js b/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js index 84b94ab64c..08d1e0638b 100644 --- a/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js +++ b/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js @@ -400,12 +400,7 @@ export default class CreateSecretStorageDialog extends React.PureComponent { let authPrompt; let nextCaption = _t("Next"); - if (!this.state.backupSigStatus.usable) { - authPrompt =
-
{_t("Restore your key backup to upgrade your encryption")}
-
; - nextCaption = _t("Restore"); - } else if (this.state.canUploadKeysWithPasswordOnly) { + if (this.state.canUploadKeysWithPasswordOnly) { authPrompt =
{_t("Enter your account password to confirm the upgrade:")}
; + } else if (!this.state.backupSigStatus.usable) { + authPrompt =
+
{_t("Restore your key backup to upgrade your encryption")}
+
; + nextCaption = _t("Restore"); } else { authPrompt =

{_t("You'll need to authenticate with the server to confirm the upgrade.")} From 567e882c327c96cbc7c921a62edd8f1515edc2e8 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 28 Feb 2020 12:04:27 +0000 Subject: [PATCH 2/3] Add missing click handler --- .../views/dialogs/secretstorage/CreateSecretStorageDialog.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js b/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js index 08d1e0638b..712f7d5f95 100644 --- a/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js +++ b/src/async-components/views/dialogs/secretstorage/CreateSecretStorageDialog.js @@ -433,6 +433,7 @@ export default class CreateSecretStorageDialog extends React.PureComponent {

{authPrompt}
From b1543c414182ff97cf69572d1cc85cae2b579af4 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 28 Feb 2020 12:32:14 +0000 Subject: [PATCH 3/3] Regen i18n --- src/i18n/strings/en_EN.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 79b045dd34..ed042d7f96 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -2064,9 +2064,9 @@ "The export file will be protected with a passphrase. You should enter the passphrase here, to decrypt the file.": "The export file will be protected with a passphrase. You should enter the passphrase here, to decrypt the file.", "File to import": "File to import", "Import": "Import", + "Enter your account password to confirm the upgrade:": "Enter your account password to confirm the upgrade:", "Restore your key backup to upgrade your encryption": "Restore your key backup to upgrade your encryption", "Restore": "Restore", - "Enter your account password to confirm the upgrade:": "Enter your account password to confirm the upgrade:", "You'll need to authenticate with the server to confirm the upgrade.": "You'll need to authenticate with the server to confirm the upgrade.", "Upgrade this session to allow it to verify other sessions, granting them access to encrypted messages and marking them as trusted for other users.": "Upgrade this session to allow it to verify other sessions, granting them access to encrypted messages and marking them as trusted for other users.", "Great! This passphrase looks strong enough.": "Great! This passphrase looks strong enough.",