This commit is contained in:
Mo Bitar
2020-02-09 00:34:14 -06:00
parent b5ec64f102
commit 046f6ca5b9
19 changed files with 919 additions and 635 deletions

View File

@@ -59,19 +59,27 @@ class AccountMenuCtrl extends PureCtrl {
},
mutable: {}
};
application.onReady(() => {
this.setState({
user: this.application.getUser(),
canAddPasscode: !this.application.isEphemeralSession(),
});
application.onReady(async () => {
this.setState(await this.refreshedCredentialState());
this.loadHost();
this.checkForSecurityUpdate();
this.reloadAutoLockInterval();
this.loadBackupsAvailability();
});
application.onCredentialChange(async () => {
this.setState(await this.refreshedCredentialState());
});
this.syncStatus = this.application.getSyncStatus();
}
async refreshedCredentialState() {
return {
user: this.application.getUser(),
canAddPasscode: !this.application.isEphemeralSession(),
hasPasscode: await this.application.hasPasscode()
};
}
$onInit() {
this.initProps({
closeFunction: this.closeFunction
@@ -473,10 +481,6 @@ class AccountMenuCtrl extends PureCtrl {
}
}
hasPasscode() {
return this.application.hasPasscode();
}
addPasscodeClicked() {
this.setFormDataState({
showPasscodeForm: true