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

View File

@@ -38,7 +38,7 @@ class PasswordWizardCtrl {
this.title = "Change Password";
this.changePassword = true;
} else if (this.type === 'upgrade-security') {
this.title = "Security Update";
this.title = "Account Update";
this.securityUpdate = true;
}
this.continueTitle = DEFAULT_CONTINUE_TITLE;
@@ -135,7 +135,7 @@ class PasswordWizardCtrl {
if (this.changePassword) {
this.formData.status = "Successfully changed password.";
} else if (this.securityUpdate) {
this.formData.status = "Successfully performed security update.";
this.formData.status = "Successfully performed account update.";
}
}

View File

@@ -9,11 +9,13 @@ class RevisionPreviewModalCtrl {
constructor(
$element,
$scope,
$timeout
$timeout,
application
) {
this.$element = $element;
this.$scope = $scope;
this.$timeout = $timeout;
this.application = application;
this.configure();
$scope.$on('$destroy', () => {
if (this.identifier) {