Updates
This commit is contained in:
@@ -45,27 +45,18 @@ angular.module('app.frontend')
|
||||
this.showAccountMenu = false;
|
||||
}.bind(this)
|
||||
|
||||
this.closeAccountMenu = () => {
|
||||
this.showAccountMenu = false;
|
||||
}
|
||||
|
||||
this.accountMenuPressed = function() {
|
||||
this.serverData = {};
|
||||
this.showAccountMenu = !this.showAccountMenu;
|
||||
this.showFaq = false;
|
||||
this.showNewPasswordForm = false;
|
||||
this.showExtensionsMenu = false;
|
||||
this.showIOMenu = false;
|
||||
}
|
||||
|
||||
this.toggleExtensions = function() {
|
||||
this.showAccountMenu = false;
|
||||
this.showIOMenu = false;
|
||||
this.showExtensionsMenu = !this.showExtensionsMenu;
|
||||
}
|
||||
|
||||
this.toggleIO = function() {
|
||||
this.showIOMenu = !this.showIOMenu;
|
||||
this.showExtensionsMenu = false;
|
||||
this.showAccountMenu = false;
|
||||
}
|
||||
|
||||
this.hasPasscode = function() {
|
||||
return passcodeManager.hasPasscode();
|
||||
}
|
||||
|
||||
@@ -64,9 +64,9 @@ angular.module('app.frontend')
|
||||
|
||||
syncManager.sync(null);
|
||||
// refresh every 30s
|
||||
// setInterval(function () {
|
||||
// syncManager.sync(null);
|
||||
// }, 30000);
|
||||
setInterval(function () {
|
||||
syncManager.sync(null);
|
||||
}, 30000);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,8 @@ class AccountMenu {
|
||||
this.restrict = "E";
|
||||
this.templateUrl = "frontend/directives/account-menu.html";
|
||||
this.scope = {
|
||||
"onSuccessfulAuth" : "&"
|
||||
"onSuccessfulAuth" : "&",
|
||||
"closeFunction" : "&"
|
||||
};
|
||||
}
|
||||
|
||||
@@ -15,28 +16,15 @@ class AccountMenu {
|
||||
$scope.user = authManager.user;
|
||||
$scope.server = syncManager.serverURL;
|
||||
|
||||
$scope.close = function() {
|
||||
$scope.closeFunction()();
|
||||
}
|
||||
|
||||
$scope.encryptedBackupsAvailable = function() {
|
||||
return authManager.user || passcodeManager.hasPasscode();
|
||||
}
|
||||
|
||||
$scope.syncStatus = syncManager.syncStatus;
|
||||
|
||||
$scope.encryptionKey = function() {
|
||||
return authManager.keys().mk;
|
||||
}
|
||||
|
||||
$scope.authKey = function() {
|
||||
return authManager.keys().ak;
|
||||
}
|
||||
|
||||
$scope.serverPassword = function() {
|
||||
return syncManager.serverPassword;
|
||||
}
|
||||
|
||||
$scope.dashboardURL = function() {
|
||||
return `${$scope.server}/dashboard/#server=${$scope.server}&id=${encodeURIComponent($scope.user.email)}&pw=${$scope.serverPassword()}`;
|
||||
}
|
||||
|
||||
$scope.newPasswordData = {};
|
||||
|
||||
$scope.showPasswordChangeForm = function() {
|
||||
|
||||
@@ -21,10 +21,6 @@ class SyncManager {
|
||||
return this.storageManager.getItem("mk");
|
||||
}
|
||||
|
||||
get serverPassword() {
|
||||
return this.storageManager.getItem("pw");
|
||||
}
|
||||
|
||||
writeItemsToLocalStorage(items, offlineOnly, callback) {
|
||||
if(items.length == 0) {
|
||||
callback && callback();
|
||||
|
||||
Reference in New Issue
Block a user