mirror of
https://github.com/nextcloud/passman.git
synced 2024-09-21 15:26:33 +08:00
Added default vault opening after logout to prevent confusion
Signed-off-by: fnuesse <felix.nuesse@t-online.de>
This commit is contained in:
parent
e692cdba96
commit
34917099bf
|
@ -44,6 +44,8 @@
|
|||
}
|
||||
|
||||
$scope.logout = function () {
|
||||
//see vault.js:54
|
||||
$rootScope.override_default_vault=true;
|
||||
$scope.active_vault = false;
|
||||
};
|
||||
if (SettingsService.getSetting('defaultVault') && SettingsService.getSetting('defaultVaultPass')) {
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
.controller('MenuCtrl', ['$scope', 'VaultService', '$location', '$rootScope', 'TagService','SettingsService', '$translate',
|
||||
function ($scope, VaultService, $location, $rootScope, TagService, SettingsService, $translate) {
|
||||
$rootScope.logout = function () {
|
||||
//see vault.js:54
|
||||
$rootScope.override_default_vault=true;
|
||||
SettingsService.setSetting('defaultVaultPass', false);
|
||||
TagService.resetTags();
|
||||
$rootScope.$broadcast('logout');
|
||||
|
|
|
@ -46,7 +46,11 @@
|
|||
var vault = vaults[i];
|
||||
if (vault.guid === default_vault.guid) {
|
||||
$scope.default_vault = true;
|
||||
$scope.list_selected_vault = vault;
|
||||
//This prevents the opening of the default vault if the user logs out
|
||||
if(!$rootScope.override_default_vault){
|
||||
$scope.list_selected_vault = vault;
|
||||
$rootScope.override_default_vault=false;
|
||||
}
|
||||
SettingsService.setSetting('defaultVault', vault);
|
||||
if (SettingsService.getSetting('defaultVaultPass')) {
|
||||
$location.path('/vault/' + vault.guid);
|
||||
|
@ -219,7 +223,8 @@
|
|||
};
|
||||
|
||||
|
||||
$scope.createVault = function (vault_name, vault_key, vault_key2) {
|
||||
|
||||
$scope.createVault = function (vault_name, vault_key, vault_key2) {
|
||||
if (vault_key !== vault_key2) {
|
||||
$scope.error = $translate.instant('password.do.not.match');
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue