diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2015-04-16 13:47:27 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2015-04-16 14:30:19 +0200 |
commit | e93f262eac858bc149872966c85e8019a1970d0a (patch) | |
tree | 79088df187ddb383d0b1f770c176584f5b7fe184 /apps/encryption/js | |
parent | 99b0c6e525e71de18245ba434852389349b4f2d7 (diff) | |
download | nextcloud-server-e93f262eac858bc149872966c85e8019a1970d0a.tar.gz nextcloud-server-e93f262eac858bc149872966c85e8019a1970d0a.zip |
display warning if password changed or if the keys are not initialized
Diffstat (limited to 'apps/encryption/js')
-rw-r--r-- | apps/encryption/js/encryption.js | 33 |
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(); + }); +}); |