From 848bc57f29ca4aa8357617a8470afb063748dd99 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 11 Feb 2021 21:19:57 +0300 Subject: disable themes in safe mode; rework safe mode warning/login prompt --- js/Feeds.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'js/Feeds.js') 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: ` +
+ ${__('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.')} +
+ + `, + 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); -- cgit v1.2.3