From 0473939fff65384badf6d15f30a0e236f2110b3c Mon Sep 17 00:00:00 2001 From: Stan Grishin Date: Sat, 9 Dec 2023 13:43:05 +0000 Subject: [PATCH] luci-app-adblock-fast: bugfix: L.uci.load * fix app not working on systems without smartdns * fix smartdns instances selection dependencies Signed-off-by: Stan Grishin --- applications/luci-app-adblock-fast/Makefile | 2 +- .../resources/view/adblock-fast/overview.js | 8 +- .../po/templates/adblock-fast.pot | 114 +++++++++--------- 3 files changed, 63 insertions(+), 61 deletions(-) diff --git a/applications/luci-app-adblock-fast/Makefile b/applications/luci-app-adblock-fast/Makefile index 0d5e1ab048..bb86f08101 100644 --- a/applications/luci-app-adblock-fast/Makefile +++ b/applications/luci-app-adblock-fast/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_LICENSE:=GPL-3.0-or-later PKG_MAINTAINER:=Stan Grishin -PKG_VERSION:=1.1.0-3 +PKG_VERSION:=1.1.0-4 LUCI_TITLE:=AdBlock-Fast Web UI LUCI_DESCRIPTION:=Provides Web UI for adblock-fast service. 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 f34855a6f8..086200aa89 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 @@ -25,9 +25,9 @@ return view.extend({ return Promise.all([ L.resolveDefault(adb.getFileUrlFilesizes(pkg.Name), {}), L.resolveDefault(adb.getPlatformSupport(pkg.Name), {}), - L.uci.load(pkg.Name), - L.uci.load("dhcp"), - L.uci.load("smartdns"), + L.resolveDefault(L.uci.load(pkg.Name), {}), + L.resolveDefault(L.uci.load("dhcp"), {}), + L.resolveDefault(L.uci.load("smartdns"), {}), ]); }, @@ -241,6 +241,8 @@ return view.extend({ o.value("-", _("No AdBlock on SmartDNS")); o.default = "*"; o.depends("dns", "smartdns.domainset"); + o.depends("dns", "smartdns.ipset"); + o.depends("dns", "smartdns.nftset"); o.retain = true; o = s1.taboption( diff --git a/applications/luci-app-adblock-fast/po/templates/adblock-fast.pot b/applications/luci-app-adblock-fast/po/templates/adblock-fast.pot index d7ac1a25f5..9c25c3d6ef 100644 --- a/applications/luci-app-adblock-fast/po/templates/adblock-fast.pot +++ b/applications/luci-app-adblock-fast/po/templates/adblock-fast.pot @@ -18,7 +18,7 @@ msgstr "" msgid "-" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:451 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:453 msgid "Action" msgstr "" @@ -45,11 +45,11 @@ msgstr "" msgid "AdBlock-Fast" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:402 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:404 msgid "AdBlock-Fast - Allowed and Blocked Domains" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:426 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:428 msgid "AdBlock-Fast - Allowed and Blocked Lists URLs" msgstr "" @@ -61,11 +61,11 @@ msgstr "" msgid "AdBlock-Fast - Status" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:304 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:306 msgid "Add IPv6 entries" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:301 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:303 msgid "Add IPv6 entries to block-list." msgstr "" @@ -73,21 +73,21 @@ msgstr "" msgid "Advanced Configuration" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:452 -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:457 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:454 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:459 msgid "Allow" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:410 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:412 msgid "Allowed Domains" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:365 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:367 msgid "" "Attempt to create a compressed cache of block-list in the persistent memory." msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:289 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:291 msgid "Automatic Config Update" msgstr "" @@ -95,12 +95,12 @@ msgstr "" msgid "Basic Configuration" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:453 -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:457 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:455 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:459 msgid "Block" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:418 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:420 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/status/include/70_adblock-fast.js:87 msgid "Blocked Domains" msgstr "" @@ -141,15 +141,15 @@ msgstr "" msgid "Config (%s) validation failure!" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:262 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:264 msgid "Controls system log and console output verbosity." msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:338 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:340 msgid "Curl download retry" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:325 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:327 msgid "Curl maximum file size (in bytes)" msgstr "" @@ -162,21 +162,21 @@ msgstr "" msgid "DNS resolution option, see the %sREADME%s for details." msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:376 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:378 msgid "Directory for compressed cache file" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:378 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:380 msgid "" "Directory for compressed cache file of block-list in the persistent memory." msgstr "" #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:424 -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:292 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:294 msgid "Disable" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:394 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:396 msgid "Disable Debugging" msgstr "" @@ -192,19 +192,19 @@ msgstr "" msgid "Dnsmasq Config File URL" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:303 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:305 msgid "Do not add IPv6 entries" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:368 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:370 msgid "Do not store compressed cache" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:355 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:357 msgid "Do not use simultaneous processing" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:315 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:317 msgid "Download time-out (in seconds)" msgstr "" @@ -214,17 +214,17 @@ msgid "Downloading lists" msgstr "" #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/adblock-fast/status.js:405 -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:293 -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:447 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:295 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:449 msgid "Enable" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:391 -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:395 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:393 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:397 msgid "Enable Debugging" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:392 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:394 msgid "Enables debug output to /tmp/adblock-fast.log." msgstr "" @@ -349,11 +349,11 @@ msgstr "" msgid "Force Reloading" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:250 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:252 msgid "Force Router DNS" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:254 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:256 msgid "Force Router DNS server to all local devices" msgstr "" @@ -361,7 +361,7 @@ msgstr "" msgid "Force redownloading %s block lists" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:251 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:253 msgid "Forces Router DNS use on local devices, also known as DNS Hijacking." msgstr "" @@ -373,27 +373,27 @@ msgstr "" msgid "Grant UCI and file access for luci-app-adblock-fast" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:300 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:302 msgid "IPv6 Support" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:327 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:329 msgid "" "If curl is installed and detected, it would not download files bigger than " "this." msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:340 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:342 msgid "" "If curl is installed and detected, it would retry download this many times " "on timeout/fail." msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:411 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:413 msgid "Individual domains to be allowed." msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:419 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:421 msgid "Individual domains to be blocked." msgstr "" @@ -401,17 +401,17 @@ msgstr "" msgid "Invalid compressed cache directory '%s'" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:274 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:276 msgid "LED to indicate status" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:352 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:354 msgid "" "Launch all lists downloads and processing simultaneously, reducing service " "start time." msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:253 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:255 msgid "Let local devices use their own DNS servers if set" msgstr "" @@ -435,7 +435,7 @@ msgstr "" msgid "Not installed or not found" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:261 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:263 msgid "Output Verbosity Setting" msgstr "" @@ -447,11 +447,11 @@ msgstr "" msgid "Pausing %s" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:290 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:292 msgid "Perform config update before downloading the block/allow-lists." msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:276 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:278 msgid "Pick the LED not already used in %sSystem LED Configuration%s." msgstr "" @@ -498,19 +498,19 @@ msgstr "" msgid "Service Warnings" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:350 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:352 msgid "Simultaneous processing" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:434 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:436 msgid "Size" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:444 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:446 msgid "Size: %s" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:265 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:267 msgid "Some output" msgstr "" @@ -539,7 +539,7 @@ msgstr "" msgid "Stop" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:316 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:318 msgid "Stop the download if it is stalled for set number of seconds." msgstr "" @@ -552,15 +552,15 @@ msgstr "" msgid "Stopping %s service" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:369 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:371 msgid "Store compressed cache" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:363 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:365 msgid "Store compressed cache file on router" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:264 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:266 msgid "Suppress output" msgstr "" @@ -590,7 +590,7 @@ msgstr "" msgid "The dnsmasq nft sets support is enabled, but nft is not installed" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:460 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:462 msgid "URL" msgstr "" @@ -599,11 +599,11 @@ msgid "" "URL to the external dnsmasq config file, see the %sREADME%s for details." msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:427 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:429 msgid "URLs to file(s) containing lists to be allowed or blocked." msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:438 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:440 #: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/status/include/70_adblock-fast.js:95 msgid "Unknown" msgstr "" @@ -621,11 +621,11 @@ msgid "" "Use of external dnsmasq config file detected, please set '%s' option to '%s'" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:356 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:358 msgid "Use simultaneous processing" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:266 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:268 msgid "Verbose output" msgstr "" @@ -673,7 +673,7 @@ msgstr "" msgid "dnsmasq servers file" msgstr "" -#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:279 +#: applications/luci-app-adblock-fast/htdocs/luci-static/resources/view/adblock-fast/overview.js:281 msgid "none" msgstr "" -- 2.30.2