Prompt user to set up 4S on logout
This commit is contained in:
parent
cf0b559075
commit
d14309f99b
1 changed files with 9 additions and 1 deletions
|
@ -38,6 +38,9 @@ enum BackupStatus {
|
||||||
/** there is a backup on the server but we are not backing up to it */
|
/** there is a backup on the server but we are not backing up to it */
|
||||||
SERVER_BACKUP_BUT_DISABLED,
|
SERVER_BACKUP_BUT_DISABLED,
|
||||||
|
|
||||||
|
/** Key backup is set up but recovery (4s) is not */
|
||||||
|
BACKUP_NO_RECOVERY,
|
||||||
|
|
||||||
/** backup is not set up locally and there is no backup on the server */
|
/** backup is not set up locally and there is no backup on the server */
|
||||||
NO_BACKUP,
|
NO_BACKUP,
|
||||||
|
|
||||||
|
@ -104,7 +107,11 @@ export default class LogoutDialog extends React.Component<IProps, IState> {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((await crypto.getActiveSessionBackupVersion()) !== null) {
|
if ((await crypto.getActiveSessionBackupVersion()) !== null) {
|
||||||
|
if (await crypto.isSecretStorageReady()) {
|
||||||
this.setState({ backupStatus: BackupStatus.BACKUP_ACTIVE });
|
this.setState({ backupStatus: BackupStatus.BACKUP_ACTIVE });
|
||||||
|
} else {
|
||||||
|
this.setState({ backupStatus: BackupStatus.BACKUP_NO_RECOVERY });
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,6 +261,7 @@ export default class LogoutDialog extends React.Component<IProps, IState> {
|
||||||
case BackupStatus.NO_BACKUP:
|
case BackupStatus.NO_BACKUP:
|
||||||
case BackupStatus.SERVER_BACKUP_BUT_DISABLED:
|
case BackupStatus.SERVER_BACKUP_BUT_DISABLED:
|
||||||
case BackupStatus.ERROR:
|
case BackupStatus.ERROR:
|
||||||
|
case BackupStatus.BACKUP_NO_RECOVERY:
|
||||||
return this.renderSetupBackupDialog();
|
return this.renderSetupBackupDialog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue