WIP
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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.";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user