aboutsummaryrefslogtreecommitdiffstats
path: root/apps/encryption/js/encryption.js
diff options
context:
space:
mode:
authorClark Tomlinson <fallen013@gmail.com>2015-04-16 09:45:09 -0400
committerClark Tomlinson <fallen013@gmail.com>2015-04-16 09:45:09 -0400
commitac133e9faa0a3568716596e83c5ff0993c8dcf89 (patch)
treefa97f4a1d7d633050c23338407ad35e01865f551 /apps/encryption/js/encryption.js
parent1174ad0681bb82252a26b5ee44d5b2990171932b (diff)
parente93f262eac858bc149872966c85e8019a1970d0a (diff)
downloadnextcloud-server-ac133e9faa0a3568716596e83c5ff0993c8dcf89.tar.gz
nextcloud-server-ac133e9faa0a3568716596e83c5ff0993c8dcf89.zip
Merge pull request #15675 from owncloud/enc_error_messages
[encryption] display warning if password changed or if the keys are not initialized
Diffstat (limited to 'apps/encryption/js/encryption.js')
-rw-r--r--apps/encryption/js/encryption.js33
1 files changed, 29 insertions, 4 deletions
diff --git a/apps/encryption/js/encryption.js b/apps/encryption/js/encryption.js
index d2d1c3a1fc5..c02b4d74ae8 100644
--- a/apps/encryption/js/encryption.js
+++ b/apps/encryption/js/encryption.js
@@ -9,8 +9,33 @@
* @namespace
* @memberOf OC
*/
-OC.Encryption={
- MIGRATION_OPEN:0,
- MIGRATION_COMPLETED:1,
- MIGRATION_IN_PROGRESS:-1,
+OC.Encryption= {
+ MIGRATION_OPEN: 0,
+ MIGRATION_COMPLETED: 1,
+ MIGRATION_IN_PROGRESS: -1,
+
+
+ displayEncryptionWarning: function () {
+
+ if (!OC.Notification.isHidden()) {
+ return;
+ }
+
+ $.get(
+ OC.generateUrl('/apps/encryption/ajax/getStatus')
+ , function( result ) {
+ if (result.status === "success") {
+ OC.Notification.show(result.data.message);
+ }
+ }
+ );
+ }
};
+
+$(document).ready(function() {
+ // wait for other apps/extensions to register their event handlers and file actions
+ // in the "ready" clause
+ _.defer(function() {
+ OC.Encryption.displayEncryptionWarning();
+ });
+});