diff options
author | brantje <brantje@gmail.com> | 2016-10-09 19:02:20 +0300 |
---|---|---|
committer | brantje <brantje@gmail.com> | 2016-10-09 19:09:52 +0300 |
commit | c488b3b50c355bd4ef17408775eb66923afc719e (patch) | |
tree | dcc9c07fc8f260d7fde423f8ee8eaf69c21d0bf9 /js | |
parent | 5907f1bca2e7cf4b21e56ede7dfb218c1297f027 (diff) |
Small cleanup
Small fix for loading vaultkey
Diffstat (limited to 'js')
-rw-r--r-- | js/app/controllers/settings.js | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/js/app/controllers/settings.js b/js/app/controllers/settings.js index 043ee713..8f0121b0 100644 --- a/js/app/controllers/settings.js +++ b/js/app/controllers/settings.js @@ -30,10 +30,9 @@ } VaultService.getVault($scope.active_vault).then(function (vault) { - vault.vaultKey = SettingsService.getSetting('defaultVaultPass'); + vault.vaultKey = VaultService.getActiveVault().vaultKey; delete vault.credentials; VaultService.setActiveVault(vault); - console.log(vault); $scope.vault_settings = vault.vault_settings; if(!$scope.vault_settings.hasOwnProperty('pwSettings')){ $scope.vault_settings.pwSettings = { @@ -125,10 +124,6 @@ } }); - if ($scope.active_vault) { - - } - $rootScope.$on('logout', function () { $scope.selectedVault = false; }); @@ -189,7 +184,7 @@ var changeCredential = function (index, oldVaultPass, newVaultPass) { CredentialService.reencryptCredential(_selected_credentials[index].guid, oldVaultPass, newVaultPass).progress(function (data) { $scope.cur_state = data; - }).then(function (data) { + }).then(function () { var percent = index / _selected_credentials.length * 100; $scope.change_pw = { percent: percent, @@ -201,7 +196,7 @@ } else { vault.private_sharing_key = EncryptService.decryptString(angular.copy(vault.private_sharing_key), oldVaultPass); vault.private_sharing_key = EncryptService.encryptString(vault.private_sharing_key, newVaultPass); - VaultService.updateSharingKeys(vault).then(function (result) { + VaultService.updateSharingKeys(vault).then(function () { $rootScope.$broadcast('logout'); NotificationService.showNotification('Please login with your new vault password', 5000); }); |