nextcloud/apps/encryption/js/encryption.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
829 B
JavaScript
Raw Normal View History

2015-03-26 20:35:36 -04:00
/**
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2014-2015 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-or-later
2015-03-26 20:35:36 -04:00
*/
2015-04-21 06:19:15 -04:00
/**
* @namespace
* @memberOf OC
*/
OC.Encryption = _.extend(OC.Encryption || {}, {
2015-04-21 06:01:56 -04:00
displayEncryptionWarning: function () {
if (!OC.currentUser || !OC.Notification.isHidden()) {
2015-04-21 06:01:56 -04:00
return;
}
2015-04-21 06:01:56 -04:00
$.get(
OC.generateUrl('/apps/encryption/ajax/getStatus'),
function (result) {
2015-05-27 05:10:06 -04:00
if (result.status === "interactionNeeded") {
2015-04-21 06:01:56 -04:00
OC.Notification.show(result.data.message);
}
}
);
}
});
window.addEventListener('DOMContentLoaded', function() {
// wait for other apps/extensions to register their event handlers and file actions
// in the "ready" clause
_.defer(function() {
2015-04-21 06:01:56 -04:00
OC.Encryption.displayEncryptionWarning();
});
});