fix: download backup later in the change password process
This commit is contained in:
@@ -173,12 +173,13 @@ class PasswordWizardCtrl extends PureViewCtrl<Props, State> implements PasswordW
|
||||
}
|
||||
|
||||
async processPasswordChange() {
|
||||
await this.application.downloadBackup();
|
||||
await this.setState({
|
||||
lockContinue: true,
|
||||
processing: true
|
||||
});
|
||||
await this.setFormDataState({
|
||||
status: "Processing encryption keys..."
|
||||
status: "Processing encryption keys…"
|
||||
});
|
||||
const newPassword = this.props.securityUpdate
|
||||
? this.state.formData.currentPassword
|
||||
|
||||
@@ -18,5 +18,5 @@ export interface Bridge {
|
||||
onMajorDataChange(): void;
|
||||
onInitialDataLoad(): void;
|
||||
onSearch(text?: string): void;
|
||||
downloadBackup(): void;
|
||||
downloadBackup(): Promise<void>;
|
||||
}
|
||||
|
||||
@@ -147,7 +147,6 @@ export class WebApplication extends SNApplication {
|
||||
}
|
||||
|
||||
presentPasswordWizard(type: PasswordWizardType) {
|
||||
this.bridge.downloadBackup();
|
||||
const scope = this.scope!.$new(true) as PasswordWizardScope;
|
||||
scope.type = type;
|
||||
scope.application = this;
|
||||
@@ -157,6 +156,10 @@ export class WebApplication extends SNApplication {
|
||||
this.applicationElement.append(el);
|
||||
}
|
||||
|
||||
downloadBackup(): Promise<void> {
|
||||
return this.bridge.downloadBackup();
|
||||
}
|
||||
|
||||
authenticationInProgress() {
|
||||
return this.currentAuthenticationElement != null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user