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:
authorMarcos Zuriaga <wolfi@wolfi.es>2021-08-22 14:45:17 +0300
committerMarcos Zuriaga <wolfi@wolfi.es>2021-08-22 14:45:17 +0300
commit88fef6029bfaddaf82395d7893cc401487aba554 (patch)
tree8045a2b3cc8dc6963b2a0097b499170942cb41f6 /js/app
parent337f8cf32e254d48c554013e38509b6001960cbc (diff)
parent796b3091ffb27e12858a5e7d156ca502d743c6b8 (diff)
Merge branch 'ui-improvements' into next
Diffstat (limited to 'js/app')
-rw-r--r--js/app/controllers/bookmarklet.js6
-rw-r--r--js/app/controllers/export.js20
-rw-r--r--js/app/controllers/settings.js6
3 files changed, 20 insertions, 12 deletions
diff --git a/js/app/controllers/bookmarklet.js b/js/app/controllers/bookmarklet.js
index a1d292bd..6673dba2 100644
--- a/js/app/controllers/bookmarklet.js
+++ b/js/app/controllers/bookmarklet.js
@@ -411,9 +411,13 @@
NotificationService.showNotification($translate.instant('credential.created'), 5000);
});
}
+ setTimeout(() => window.close(), 3000);
};
+ $scope.cancel = function () {
+ window.close();
+ };
}
]);
-}()); \ No newline at end of file
+}());
diff --git a/js/app/controllers/export.js b/js/app/controllers/export.js
index b284048c..f152b506 100644
--- a/js/app/controllers/export.js
+++ b/js/app/controllers/export.js
@@ -72,15 +72,19 @@
if (vault.hasOwnProperty('credentials')) {
if (vault.credentials.length > 0) {
for (var i = 0; i < vault.credentials.length; i++) {
- var _credential = angular.copy(vault.credentials[i]);
- if (_credential.hidden === 0) {
- var key = CredentialService.getSharedKeyFromCredential(_credential);
- _credential = CredentialService.decryptCredential(_credential, key);
- _credential.vault_key = key;
- _credentials.push(_credential);
+ try {
+ var _credential = angular.copy(vault.credentials[i]);
+ if (_credential.hidden === 0) {
+ var key = CredentialService.getSharedKeyFromCredential(_credential);
+ _credential = CredentialService.decryptCredential(_credential, key);
+ _credential.vault_key = key;
+ _credentials.push(_credential);
+ }
+ } catch (e) {
+ _log($translate.instant('export.decrypt.error', {credential: (vault.credentials[i].label !== undefined) ? vault.credentials[i].label : i}));
}
}
- $window.PassmanExporter[$scope.selectedExporter.id].export(_credentials, FileService, EncryptService).then(function () {
+ $window.PassmanExporter[$scope.selectedExporter.id].export(_credentials, FileService, EncryptService, $scope.log, $translate).then(function () {
_log($translate.instant('done'));
});
}
@@ -92,4 +96,4 @@
}]);
-}()); \ No newline at end of file
+}());
diff --git a/js/app/controllers/settings.js b/js/app/controllers/settings.js
index 750b41a4..9fa1f155 100644
--- a/js/app/controllers/settings.js
+++ b/js/app/controllers/settings.js
@@ -87,8 +87,8 @@
});
var btn_txt = $translate.instant('bookmarklet.text');
- var http = location.protocol, slashes = http.concat("//"), host = slashes.concat(window.location.hostname), complete = host + location.pathname;
- $scope.bookmarklet = $sce.trustAsHtml("<a class=\"button\" href=\"javascript:(function(){var a=window,b=document,c=encodeURIComponent,e=c(document.title),d=a.open('" + complete + "bookmarklet?url='+c(b.location)+'&title='+e,'bkmk_popup','left='+((a.screenX||a.screenLeft)+10)+',top='+((a.screenY||a.screenTop)+10)+',height=750px,width=475px,resizable=0,alwaysRaised=1');a.setTimeout(function(){d.focus()},300);})();\">" + btn_txt + "</a>");
+ var http = location.protocol, slashes = http.concat("//"), host = slashes.concat(window.location.hostname + ":" + window.location.port), complete = host + location.pathname;
+ $scope.bookmarklet = $sce.trustAsHtml("<a class=\"button\" href=\"javascript:(function(){var a=window,b=document,c=encodeURIComponent,e=c(document.title),d=a.open('" + complete + "/bookmarklet?url='+c(b.location)+'&title='+e,'bkmk_popup','left='+((a.screenX||a.screenLeft)+10)+',top='+((a.screenY||a.screenTop)+10)+',height=750px,width=475px,resizable=0,alwaysRaised=1');a.setTimeout(function(){d.focus()},300);})();\">" + btn_txt + "</a>");
$scope.saveVaultSettings = function () {
@@ -322,4 +322,4 @@
}]);
-}()); \ No newline at end of file
+}());