From 0a09ae1805f3e1184ad67ebb9a47b00c020c8b27 Mon Sep 17 00:00:00 2001 From: Khachatryan Karen Date: Tue, 27 May 2025 21:53:04 +0300 Subject: [PATCH] luci-app-antiblock: Disable routes without deleting 1) Added the ability to disable routes without deleting them. Signed-off-by: Khachatryan Karen --- .../htdocs/luci-static/resources/view/antiblock/routes.js | 4 ++++ applications/luci-app-antiblock/po/templates/antiblock.pot | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/applications/luci-app-antiblock/htdocs/luci-static/resources/view/antiblock/routes.js b/applications/luci-app-antiblock/htdocs/luci-static/resources/view/antiblock/routes.js index 65ceea5c3c..215885670b 100644 --- a/applications/luci-app-antiblock/htdocs/luci-static/resources/view/antiblock/routes.js +++ b/applications/luci-app-antiblock/htdocs/luci-static/resources/view/antiblock/routes.js @@ -21,6 +21,10 @@ return view.extend({ o = s.option(form.Value, 'domains_path', _('Domains path'), _('Domains path/URL. If you want to add domains via LuCI, specify the files in the /etc/antiblock folder.')); o.default = '/etc/antiblock/'; + o = s.option(form.Flag, 'enabled', _('Enable')); + o.default = o.enabled; + o.editable = true; + return m.render(); } }); diff --git a/applications/luci-app-antiblock/po/templates/antiblock.pot b/applications/luci-app-antiblock/po/templates/antiblock.pot index f448a70fb0..d878cd340e 100644 --- a/applications/luci-app-antiblock/po/templates/antiblock.pot +++ b/applications/luci-app-antiblock/po/templates/antiblock.pot @@ -38,6 +38,10 @@ msgstr "" msgid "Domains path:" msgstr "" +#: applications/luci-app-antiblock/htdocs/luci-static/resources/view/antiblock/routes.js:24 +msgid "Enable" +msgstr "" + #: applications/luci-app-antiblock/htdocs/luci-static/resources/view/antiblock/args.js:13 msgid "Enabled" msgstr "" -- 2.30.2