Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/passman.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js/app
diff options
context:
space:
mode:
authorbinsky <timo@binsky.org>2021-03-24 20:28:57 +0300
committerbinsky <timo@binsky.org>2021-03-24 20:28:57 +0300
commite65e3353501a12be2fea46b7135c7a7ce5b71490 (patch)
tree8b61f550d9278bbe3dd887a314dabe11f64aa398 /js/app
parent3cbb2dcda1dd0f9f042ad38199fc6c6e4264e5b4 (diff)
add reload button; auto reload vault after import
Diffstat (limited to 'js/app')
-rw-r--r--js/app/controllers/credential.js5
-rw-r--r--js/app/controllers/import.js15
2 files changed, 11 insertions, 9 deletions
diff --git a/js/app/controllers/credential.js b/js/app/controllers/credential.js
index 9d84f33c..21121cf3 100644
--- a/js/app/controllers/credential.js
+++ b/js/app/controllers/credential.js
@@ -50,6 +50,11 @@
}
}
+ $rootScope.refresh = function () {
+ fetchCredentials();
+ getPendingShareRequests();
+ };
+
$scope.show_spinner = true;
var fetchCredentials = function () {
VaultService.getVault({guid: $routeParams.vault_id}).then(function (vault) {
diff --git a/js/app/controllers/import.js b/js/app/controllers/import.js
index 7014e9ea..0fc9dbea 100644
--- a/js/app/controllers/import.js
+++ b/js/app/controllers/import.js
@@ -31,7 +31,7 @@
* Controller of the passmanApp
*/
angular.module('passmanApp')
- .controller('ImportCtrl', ['$scope', '$window', 'CredentialService', 'VaultService', 'FileService', 'EncryptService', '$translate', function ($scope, $window, CredentialService, VaultService, FileService, EncryptService, $translate) {
+ .controller('ImportCtrl', ['$scope', '$rootScope', '$window', 'CredentialService', 'VaultService', 'FileService', 'EncryptService', '$translate', function ($scope, $rootScope, $window, CredentialService, VaultService, FileService, EncryptService, $translate) {
$scope.available_importers = [];
$scope.active_vault = VaultService.getActiveVault();
@@ -109,6 +109,7 @@
total: parsed_data.length
};
_log($translate.instant('done'));
+ $rootScope.refresh();
}
}
});
@@ -130,7 +131,7 @@
process.setRequiredServices(FileService, EncryptService);
}
- process = process.readFile(file_data).then(function (parseddata) {
+ process.readFile(file_data).then(function (parseddata) {
parsed_data = parseddata;
$scope.file_read_progress = {
percent: 100,
@@ -144,14 +145,10 @@
} else {
// @TODO Show message no data found
}
+ }).progress(function (progress) {
+ $scope.file_read_progress = progress;
+ $scope.$digest();
});
-
- if ($scope.selectedImporter.id !== 'passmanJson'){
- process.progress(function (progress) {
- $scope.file_read_progress = progress;
- $scope.$digest();
- });
- }
}
};