summaryrefslogtreecommitdiff
path: root/js/Feeds.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-11 21:19:57 +0300
committerAndrew Dolgov <[email protected]>2021-02-11 21:19:57 +0300
commit848bc57f29ca4aa8357617a8470afb063748dd99 (patch)
tree0f4a99b0d82c30924f3e0df85834a30e885470f8 /js/Feeds.js
parent74986d1ac6e5d0433bff460aa2b0d1757c75f4b4 (diff)
disable themes in safe mode; rework safe mode warning/login prompt
Diffstat (limited to 'js/Feeds.js')
-rw-r--r--js/Feeds.js32
1 files changed, 32 insertions, 0 deletions
diff --git a/js/Feeds.js b/js/Feeds.js
index ccb982cb3..64e932ca2 100644
--- a/js/Feeds.js
+++ b/js/Feeds.js
@@ -247,6 +247,38 @@ const Feeds = {
});
}
+ if (dijit.byId("safeModeDlg"))
+ dijit.byId("safeModeDlg").destroyRecursive();
+
+ if (App.getInitParam("safe_mode")) {
+ const dialog = new dijit.Dialog({
+ title: __("Safe mode"),
+ content: `
+ <div class='alert alert-info'>
+ ${__('Tiny Tiny RSS is running in safe mode. All themes and plugins are disabled. You will need to log out and back in to disable it.')}
+ </div>
+ <footer class='text-center'>
+ <button dojoType='dijit.form.Button' type='submit'>
+ ${__('Close this window')}
+ </button>
+ </footer>
+ `,
+ id: 'safeModeDlg',
+ style: "width: 600px",
+ onCancel: function () {
+ return true;
+ },
+ onExecute: function () {
+ return true;
+ },
+ onClose: function () {
+ return true;
+ }
+ });
+
+ dialog.show();
+ }
+
// bw_limit disables timeout() so we request initial counters separately
if (App.getInitParam("bw_limit")) {
this.requestCounters(true);