summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-adblock/luasrc/model
diff options
context:
space:
mode:
authorDirk Brenken <dev@brenken.org>2018-05-14 22:09:31 +0200
committerDirk Brenken <dev@brenken.org>2018-05-15 08:00:02 +0200
commit55f251b01f22a8e5179f0f6767d1be44c745239e (patch)
tree0c96d48cd9ceeb3e293c8c2604a10d9260da08d3 /applications/luci-app-adblock/luasrc/model
parent3aae6ce82ef385d2c77a2c2073d231797bef4c13 (diff)
luci-app-adblock: sync with adblock 3.5.2
* archive sub-categories (shalla & ut_capitole) are now configurable via LuCI CBI template * small bugfixes & enhancements Signed-off-by: Dirk Brenken <dev@brenken.org>
Diffstat (limited to 'applications/luci-app-adblock/luasrc/model')
-rw-r--r--applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua19
1 files changed, 6 insertions, 13 deletions
diff --git a/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua b/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua
index ec5a75cefc..3f39622920 100644
--- a/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua
+++ b/applications/luci-app-adblock/luasrc/model/cbi/adblock/overview_tab.lua
@@ -9,16 +9,6 @@ local dump = util.ubus("network.interface", "dump", {})
local json = require("luci.jsonc")
local adbinput = uci:get("adblock", "global", "adb_rtfile") or "/tmp/adb_runtime.json"
-if not uci:get("adblock", "extra") then
- m = SimpleForm("", nil, translate("Please update your adblock config file to use this package.<br />")
- .. translatef("During opkg package installation use the '--force-maintainer' option to overwrite the pre-existing config file or download a fresh default config from "
- .. "<a href=\"%s\" target=\"_blank\">"
- .. "here</a>", "https://raw.githubusercontent.com/openwrt/packages/master/net/adblock/files/adblock.conf"))
- m.submit = false
- m.reset = false
- return m
-end
-
m = Map("adblock", translate("Adblock"),
translate("Configuration of the adblock package to block ad/abuse domains by using DNS. ")
.. translatef("For further information "
@@ -175,9 +165,7 @@ end
-- Blocklist table
bl = m:section(TypedSection, "source", translate("Blocklist Sources"),
- translate("Available blocklist sources. ")
- .. translate("List URLs and Shallalist category selections are configurable in the 'Advanced' section.<br />")
- .. translate("Caution: To prevent OOM exceptions on low memory devices with less than 64 MB free RAM, please do not select more than five blocklist sources!"))
+ translate("<b>Caution:</b> To prevent OOM exceptions on low memory devices with less than 64 MB free RAM, please only select a few of them!"))
bl.template = "adblock/blocklist"
name = bl:option(Flag, "enabled", translate("Enabled"))
@@ -192,8 +180,13 @@ function ssl.cfgvalue(self, section)
return translate("No")
end
end
+
des = bl:option(DummyValue, "adb_src_desc", translate("Description"))
+cat = bl:option(DynamicList, "adb_src_cat", translate("Categories"))
+cat.datatype = "uciname"
+cat.optional = true
+
-- Extra options
e = m:section(NamedSection, "extra", "adblock", translate("Extra Options"),