diff options
author | Stan Grishin <stangri@melmac.ca> | 2023-09-26 22:54:37 +0000 |
---|---|---|
committer | Stan Grishin <stangri@melmac.ca> | 2023-09-26 22:54:37 +0000 |
commit | 8d502df1b0951c415b236ccfd7a3b8ae104b765f (patch) | |
tree | 5ddfec731574708caa45e80c7b58d00b497b80dd /applications/luci-app-adblock-fast/htdocs/luci-static | |
parent | 957a6313bd6371e5afae20573a43f5440948e66e (diff) |
luci-app-adblock-fast: update to 1.0.0-3
Signed-off-by: Stan Grishin <stangri@melmac.ca>
Diffstat (limited to 'applications/luci-app-adblock-fast/htdocs/luci-static')
2 files changed, 35 insertions, 11 deletions
diff --git a/applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js b/applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js index 901d3d9f26..fa1f98e3cd 100644 --- a/applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js +++ b/applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js @@ -270,11 +270,12 @@ var status = baseclass.extend({ ), errorDownloadingList: _("Failed to download %s"), errorParsingConfigUpdate: _("Failed to parse Config Update file"), - errorParsingList: _("Failed to parse"), + errorParsingList: _("Failed to parse %s"), errorNoSSLSupport: _("No HTTPS/SSL support on device"), errorCreatingDirectory: _( "Failed to create output/cache/gzip file directory" ), + errorDetectingFileType: _("Failed to detect format %s"), }; var errorsTitle = E( "label", @@ -287,7 +288,7 @@ var status = baseclass.extend({ errorTable[element.id].format(element.extra || " ") + "<br />"; }); text += _("Errors encountered, please check the %sREADME%s!").format( - "<a href='" + pkg.URL + '" target="_blank">', + '<a href="' + pkg.URL + '" target="_blank">', "</a><br />" ); var errorsText = E("div", {}, text); diff --git a/applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js b/applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js index 92caf6b35d..ce9041e8f8 100644 --- a/applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js +++ b/applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js @@ -125,7 +125,7 @@ return view.extend({ if (reply.platform.unbound_installed) { o.value("unbound.adb_list", _("unbound adblock list")); } - o.default = ("dnsmasq.servers", _("dnsmasq servers file")); + o.default = "dnsmasq.servers"; o = s1.taboption( "tab_basic", @@ -154,6 +154,23 @@ return view.extend({ ) ); o.value("*", _("AdBlock on all instances")); + + // Object.values(L.uci.sections("dhcp", "dnsmasq")).forEach(function ( + // val, + // index + // ) { + // const nameValueMap = new Map(Object.entries(val)); + // so.value( + // nameValueMap.get(".name"), + // "%s (Name: %s, Domain: %s, Local: %s)".format( + // nameValueMap.get(".index"), + // nameValueMap.get(".name") || "noname", + // val.domain || "unset", + // val.local || "unset" + // ) + // ); + // }); + var sections = uci.sections("dhcp", "dnsmasq"); sections.forEach((element) => { var description; @@ -182,7 +199,7 @@ return view.extend({ ); o.value("0", _("Let local devices use their own DNS servers if set")); o.value("1", _("Force Router DNS server to all local devices")); - o.default = ("1", _("Force Router DNS server to all local devices")); + o.default = "1"; o = s1.taboption( "tab_basic", @@ -194,7 +211,7 @@ return view.extend({ o.value("0", _("Suppress output")); o.value("1", _("Some output")); o.value("2", _("Verbose output")); - o.default = ("2", _("Verbose output")); + o.default = "2"; if (reply.platform.leds.length) { o = s1.taboption( @@ -211,6 +228,7 @@ return view.extend({ o.value(element); }); } + o = s1.taboption( "tab_advanced", form.ListValue, @@ -220,7 +238,7 @@ return view.extend({ ); o.value("0", _("Disable")); o.value("1", _("Enable")); - o.default = ("0", _("Disable")); + o.default = "0"; o = s1.taboption( "tab_advanced", @@ -233,7 +251,7 @@ return view.extend({ o.value("1", _("Add IPv6 entries")); o.depends("dns", "dnsmasq.addnhosts"); o.depends("dns", "dnsmasq.nftset"); - o.default = ("", _("Do not add IPv6 entries")); + o.default = ""; o.rmempty = true; o.retain = true; @@ -283,7 +301,7 @@ return view.extend({ ); o.value("0", _("Do not use simultaneous processing")); o.value("1", _("Use simultaneous processing")); - o.default = ("1", _("Use simultaneous processing")); + o.default = "1"; o = s1.taboption( "tab_advanced", @@ -296,7 +314,7 @@ return view.extend({ ); o.value("0", _("Do not store compressed cache")); o.value("1", _("Store compressed cache")); - o.default = ("0", _("Do not store compressed cache")); + o.default = "0"; o = s1.taboption( "tab_advanced", @@ -322,7 +340,7 @@ return view.extend({ ); o.value("0", _("Disable Debugging")); o.value("1", _("Enable Debugging")); - o.default = ("0", _("Disable Debugging")); + o.default = "0"; s2 = m.section( form.NamedSection, @@ -332,14 +350,15 @@ return view.extend({ ); o.addremove = true; o.rmempty = true; + o = s2.option( form.DynamicList, "allowed_domain", _("Allowed Domains"), _("Individual domains to be allowed.") ); - o.addremove = true; + o = s2.option( form.DynamicList, "blocked_domain", @@ -358,6 +377,7 @@ return view.extend({ s3.sortable = true; s3.anonymous = true; s3.addremove = true; + o = s3.option(form.DummyValue, "_size", "Size"); o.modalonly = false; o.cfgvalue = function (section_id) { @@ -370,13 +390,16 @@ return view.extend({ }); return _("Size: %s").format(ret); }; + o = s3.option(form.Flag, "enabled", _("Enable")); o.editable = true; o.default = "1"; + o = s3.option(form.ListValue, "action", _("Action")); o.value("allow", _("Allow")); o.value("block", _("Block")); o.default = "block"; + o = s3.option(form.Value, "url", _("URL")); o.optional = false; |