One off fixes
This commit is contained in:
@@ -50,10 +50,9 @@ class FooterCtrl extends PureCtrl {
|
||||
|
||||
onAppLaunch() {
|
||||
super.onAppLaunch();
|
||||
this.application.hasPasscode().then((value) => {
|
||||
this.setState({
|
||||
hasPasscode: value
|
||||
});
|
||||
const hasPasscode = this.application.hasPasscode();
|
||||
this.setState({
|
||||
hasPasscode: hasPasscode
|
||||
});
|
||||
|
||||
this.godService.checkForSecurityUpdate().then((available) => {
|
||||
|
||||
@@ -63,23 +63,24 @@ class AccountMenuCtrl extends PureCtrl {
|
||||
|
||||
async onAppKeyChange() {
|
||||
super.onAppKeyChange();
|
||||
this.setState(await this.refreshedCredentialState());
|
||||
this.setState(this.refreshedCredentialState());
|
||||
}
|
||||
|
||||
async onAppLaunch() {
|
||||
super.onAppLaunch();
|
||||
this.setState(await this.refreshedCredentialState());
|
||||
this.setState(this.refreshedCredentialState());
|
||||
this.loadHost();
|
||||
this.checkForSecurityUpdate();
|
||||
this.reloadAutoLockInterval();
|
||||
this.loadBackupsAvailability();
|
||||
}
|
||||
|
||||
async refreshedCredentialState() {
|
||||
refreshedCredentialState() {
|
||||
return {
|
||||
user: this.application.getUser(),
|
||||
canAddPasscode: !this.application.isEphemeralSession(),
|
||||
hasPasscode: await this.application.hasPasscode()
|
||||
hasPasscode: this.application.hasPasscode(),
|
||||
showPasscodeForm: false
|
||||
};
|
||||
}
|
||||
|
||||
@@ -115,8 +116,8 @@ class AccountMenuCtrl extends PureCtrl {
|
||||
}
|
||||
|
||||
async loadBackupsAvailability() {
|
||||
const hasUser = !isNullOrUndefined(await this.application.getUser());
|
||||
const hasPasscode = await this.application.hasPasscode();
|
||||
const hasUser = !isNullOrUndefined(this.application.getUser());
|
||||
const hasPasscode = this.application.hasPasscode();
|
||||
const encryptedAvailable = hasUser || hasPasscode;
|
||||
|
||||
function encryptionStatusString() {
|
||||
@@ -522,10 +523,17 @@ class AccountMenuCtrl extends PureCtrl {
|
||||
}
|
||||
});
|
||||
};
|
||||
this.godService.presentPrivilegesModal(
|
||||
ProtectedActions.ManagePasscode,
|
||||
run
|
||||
const needsPrivilege = await this.application.privilegesManager.actionRequiresPrivilege(
|
||||
ProtectedActions.ManagePasscode
|
||||
);
|
||||
if (needsPrivilege) {
|
||||
this.godService.presentPrivilegesModal(
|
||||
ProtectedActions.ManagePasscode,
|
||||
run
|
||||
);
|
||||
} else {
|
||||
run();
|
||||
}
|
||||
}
|
||||
|
||||
isDesktopApplication() {
|
||||
|
||||
@@ -5,11 +5,13 @@ import { PureCtrl } from '@Controllers';
|
||||
class PrivilegesManagementModalCtrl extends PureCtrl {
|
||||
/* @ngInject */
|
||||
constructor(
|
||||
$scope,
|
||||
$timeout,
|
||||
$element,
|
||||
application
|
||||
application,
|
||||
appState
|
||||
) {
|
||||
super(null, $timeout);
|
||||
super($scope, $timeout, application, appState);
|
||||
this.$element = $element;
|
||||
this.application = application;
|
||||
}
|
||||
|
||||
@@ -281,7 +281,7 @@
|
||||
.sk-p
|
||||
| Download a backup of all your data.
|
||||
.sk-panel-row
|
||||
form.sk-panel-form.sk-panel-row(ng-if='self.encryptedBackupsAvailable()')
|
||||
form.sk-panel-form.sk-panel-row(ng-if='self.state.encryptionEnabled')
|
||||
.sk-input-group
|
||||
label.sk-horizontal-group.tight
|
||||
input(
|
||||
|
||||
496
dist/javascripts/app.js
vendored
496
dist/javascripts/app.js
vendored
File diff suppressed because one or more lines are too long
2
dist/javascripts/app.js.map
vendored
2
dist/javascripts/app.js.map
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user