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/12560pull/21833/head
parent
5325b5677f
commit
a93c13306c
|
@ -400,12 +400,7 @@ export default class CreateSecretStorageDialog extends React.PureComponent {
|
|||
|
||||
let authPrompt;
|
||||
let nextCaption = _t("Next");
|
||||
if (!this.state.backupSigStatus.usable) {
|
||||
authPrompt = <div>
|
||||
<div>{_t("Restore your key backup to upgrade your encryption")}</div>
|
||||
</div>;
|
||||
nextCaption = _t("Restore");
|
||||
} else if (this.state.canUploadKeysWithPasswordOnly) {
|
||||
if (this.state.canUploadKeysWithPasswordOnly) {
|
||||
authPrompt = <div>
|
||||
<div>{_t("Enter your account password to confirm the upgrade:")}</div>
|
||||
<div><Field
|
||||
|
@ -418,6 +413,11 @@ export default class CreateSecretStorageDialog extends React.PureComponent {
|
|||
autoFocus={true}
|
||||
/></div>
|
||||
</div>;
|
||||
} else if (!this.state.backupSigStatus.usable) {
|
||||
authPrompt = <div>
|
||||
<div>{_t("Restore your key backup to upgrade your encryption")}</div>
|
||||
</div>;
|
||||
nextCaption = _t("Restore");
|
||||
} else {
|
||||
authPrompt = <p>
|
||||
{_t("You'll need to authenticate with the server to confirm the upgrade.")}
|
||||
|
|
Loading…
Reference in New Issue