2015-03-27 00:35:36 +00:00
|
|
|
/**
|
2024-05-28 14:42:42 +00: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-27 00:35:36 +00:00
|
|
|
*/
|
|
|
|
|
2015-04-21 10:19:15 +00:00
|
|
|
/**
|
|
|
|
* @namespace
|
|
|
|
* @memberOf OC
|
|
|
|
*/
|
2015-08-06 13:53:38 +00:00
|
|
|
OC.Encryption = _.extend(OC.Encryption || {}, {
|
2015-04-21 10:01:56 +00:00
|
|
|
displayEncryptionWarning: function () {
|
2015-04-23 11:06:00 +00:00
|
|
|
if (!OC.currentUser || !OC.Notification.isHidden()) {
|
2015-04-21 10:01:56 +00:00
|
|
|
return;
|
2015-04-17 16:04:02 +00:00
|
|
|
}
|
2015-04-16 11:47:27 +00:00
|
|
|
|
2015-04-21 10:01:56 +00:00
|
|
|
$.get(
|
|
|
|
OC.generateUrl('/apps/encryption/ajax/getStatus'),
|
|
|
|
function (result) {
|
2015-05-27 09:10:06 +00:00
|
|
|
if (result.status === "interactionNeeded") {
|
2015-04-21 10:01:56 +00:00
|
|
|
OC.Notification.show(result.data.message);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
2015-08-06 13:53:38 +00:00
|
|
|
});
|
2020-07-20 10:30:35 +00:00
|
|
|
window.addEventListener('DOMContentLoaded', function() {
|
2015-04-16 11:47:27 +00:00
|
|
|
// wait for other apps/extensions to register their event handlers and file actions
|
|
|
|
// in the "ready" clause
|
|
|
|
_.defer(function() {
|
2015-04-21 10:01:56 +00:00
|
|
|
OC.Encryption.displayEncryptionWarning();
|
2015-04-16 11:47:27 +00:00
|
|
|
});
|
|
|
|
});
|