mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 14:05:04 +08:00
Merge pull request #4147 from matrix-org/jryans/locked-upgrade-dialog
Use latest backup status directly rather than via state
This commit is contained in:
commit
67fca76027
@ -83,7 +83,7 @@ export default class CreateSecretStorageDialog extends React.PureComponent {
|
|||||||
// does the server offer a UI auth flow with just m.login.password
|
// does the server offer a UI auth flow with just m.login.password
|
||||||
// for /keys/device_signing/upload?
|
// for /keys/device_signing/upload?
|
||||||
canUploadKeysWithPasswordOnly: null,
|
canUploadKeysWithPasswordOnly: null,
|
||||||
accountPassword: props.accountPassword,
|
accountPassword: props.accountPassword || "",
|
||||||
accountPasswordCorrect: null,
|
accountPasswordCorrect: null,
|
||||||
// status of the key backup toggle switch
|
// status of the key backup toggle switch
|
||||||
useKeyBackup: true,
|
useKeyBackup: true,
|
||||||
@ -117,6 +117,11 @@ export default class CreateSecretStorageDialog extends React.PureComponent {
|
|||||||
backupInfo,
|
backupInfo,
|
||||||
backupSigStatus,
|
backupSigStatus,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return {
|
||||||
|
backupInfo,
|
||||||
|
backupSigStatus,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
async _queryKeyUploadAuth() {
|
async _queryKeyUploadAuth() {
|
||||||
@ -269,13 +274,13 @@ export default class CreateSecretStorageDialog extends React.PureComponent {
|
|||||||
const RestoreKeyBackupDialog = sdk.getComponent('dialogs.keybackup.RestoreKeyBackupDialog');
|
const RestoreKeyBackupDialog = sdk.getComponent('dialogs.keybackup.RestoreKeyBackupDialog');
|
||||||
const { finished } = Modal.createTrackedDialog(
|
const { finished } = Modal.createTrackedDialog(
|
||||||
'Restore Backup', '', RestoreKeyBackupDialog, {showSummary: false}, null,
|
'Restore Backup', '', RestoreKeyBackupDialog, {showSummary: false}, null,
|
||||||
/* priority = */ false, /* static = */ true,
|
/* priority = */ false, /* static = */ false,
|
||||||
);
|
);
|
||||||
|
|
||||||
await finished;
|
await finished;
|
||||||
await this._fetchBackupInfo();
|
const { backupSigStatus } = await this._fetchBackupInfo();
|
||||||
if (
|
if (
|
||||||
this.state.backupSigStatus.usable &&
|
backupSigStatus.usable &&
|
||||||
this.state.canUploadKeysWithPasswordOnly &&
|
this.state.canUploadKeysWithPasswordOnly &&
|
||||||
this.state.accountPassword
|
this.state.accountPassword
|
||||||
) {
|
) {
|
||||||
|
Loading…
Reference in New Issue
Block a user