mirror of
https://github.com/nextcloud/passman.git
synced 2025-10-06 03:34:54 +08:00
Merge branch 'navigateAwayWarning'
This commit is contained in:
commit
8b31278429
2 changed files with 22 additions and 0 deletions
|
@ -156,6 +156,18 @@
|
|||
|
||||
$scope.cur_state = {};
|
||||
|
||||
|
||||
$scope.$on("$locationChangeStart", function(event) {
|
||||
if($scope.change_pw){
|
||||
if($scope.change_pw.total > 0 && $scope.change_pw.done < $scope.change_pw.total){
|
||||
if(!confirm("Are you sure you want to leave?\nThis will corrupt all your credentials")){
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$scope.changeVaultPassword = function (oldVaultPass, newVaultPass, newVaultPass2) {
|
||||
if (oldVaultPass !== VaultService.getActiveVault().vaultKey) {
|
||||
$scope.error = 'Your old password is incorrect!';
|
||||
|
|
|
@ -240,6 +240,15 @@
|
|||
};
|
||||
|
||||
|
||||
|
||||
$scope.$on("$locationChangeStart", function(event) {
|
||||
if(!sharing_complete){
|
||||
if(!confirm("Are you sure you want to leave?\nThis will corrupt this credential")){
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$scope.sharing_complete = true;
|
||||
$scope.applyShare = function () {
|
||||
$scope.sharing_complete = false;
|
||||
|
@ -284,6 +293,7 @@
|
|||
}
|
||||
}
|
||||
NotificationService.showNotification('Saved!', 4000);
|
||||
$scope.sharing_complete = true;
|
||||
} else {
|
||||
|
||||
ShareService.generateSharedKey(20).then(function (key) {
|
||||
|
|
Loading…
Add table
Reference in a new issue