mirror of
https://github.com/nextcloud/passman.git
synced 2025-11-17 14:19:45 +08:00
Fix loading password preferences at password creation
This commit is contained in:
parent
0a7c504b90
commit
484a88b7ac
3 changed files with 37 additions and 10 deletions
|
|
@ -22,7 +22,7 @@ angular.module('passmanApp')
|
|||
_vault.vaultKey = angular.copy(SettingsService.getSetting('defaultVaultPass'));
|
||||
VaultService.setActiveVault(_vault);
|
||||
$scope.active_vault = _vault;
|
||||
|
||||
console.log(_vault)
|
||||
//@TODO check if vault exists
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,13 +18,25 @@ angular.module('passmanApp')
|
|||
} else {
|
||||
if (SettingsService.getSetting('defaultVault') && SettingsService.getSetting('defaultVaultPass')) {
|
||||
var _vault = angular.copy(SettingsService.getSetting('defaultVault'));
|
||||
_vault.vaultKey = angular.copy(SettingsService.getSetting('defaultVaultPass'));
|
||||
VaultService.setActiveVault(_vault);
|
||||
$scope.active_vault = _vault;
|
||||
VaultService.getVault(_vault).then(function (vault) {
|
||||
vault.vaultKey = angular.copy(SettingsService.getSetting('defaultVaultPass'));
|
||||
VaultService.setActiveVault(vault);
|
||||
$scope.active_vault = vault;
|
||||
|
||||
//@TODO check if vault exists
|
||||
$scope.pwSettings = VaultService.getVaultSetting('pwSettings',
|
||||
{
|
||||
'length': 12,
|
||||
'useUppercase': true,
|
||||
'useLowercase': true,
|
||||
'useDigits': true,
|
||||
'useSpecialChars': true,
|
||||
'minimumDigitCount': 3,
|
||||
'avoidAmbiguousCharacters': false,
|
||||
'requireEveryCharType': true,
|
||||
'generateOnCreate': true
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$scope.tabs = [{
|
||||
|
|
|
|||
|
|
@ -18,12 +18,27 @@ angular.module('passmanApp')
|
|||
} else {
|
||||
if (SettingsService.getSetting('defaultVault') && SettingsService.getSetting('defaultVaultPass')) {
|
||||
var _vault = angular.copy(SettingsService.getSetting('defaultVault'));
|
||||
_vault.vaultKey = angular.copy(SettingsService.getSetting('defaultVaultPass'));
|
||||
VaultService.setActiveVault(_vault);
|
||||
$scope.active_vault = _vault;
|
||||
|
||||
VaultService.getVault(_vault).then(function (vault) {
|
||||
vault.vaultKey = SettingsService.getSetting('defaultVaultPass');
|
||||
VaultService.setActiveVault(vault);
|
||||
$scope.active_vault = vault;
|
||||
$scope.$parent.selectedVault = true;
|
||||
$scope.vault_settings.pwSettings = VaultService.getVaultSetting('pwSettings',
|
||||
{
|
||||
'length': 12,
|
||||
'useUppercase': true,
|
||||
'useLowercase': true,
|
||||
'useDigits': true,
|
||||
'useSpecialChars': true,
|
||||
'minimumDigitCount': 3,
|
||||
'avoidAmbiguousCharacters': false,
|
||||
'requireEveryCharType': true,
|
||||
'generateOnCreate': true
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if ($scope.active_vault) {
|
||||
$scope.$parent.selectedVault = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue