diff options
Diffstat (limited to 'applications/luci-app-simple-adblock/htdocs')
-rw-r--r-- | applications/luci-app-simple-adblock/htdocs/luci-static/resources/view/simple-adblock/overview.js | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/applications/luci-app-simple-adblock/htdocs/luci-static/resources/view/simple-adblock/overview.js b/applications/luci-app-simple-adblock/htdocs/luci-static/resources/view/simple-adblock/overview.js index 6b428f08da..dd311cd497 100644 --- a/applications/luci-app-simple-adblock/htdocs/luci-static/resources/view/simple-adblock/overview.js +++ b/applications/luci-app-simple-adblock/htdocs/luci-static/resources/view/simple-adblock/overview.js @@ -110,9 +110,15 @@ return view.extend({ o = s.taboption("tab_advanced", form.Value, "download_timeout", _("Download time-out (in seconds)"), _("Stop the download if it is stalled for set number of seconds.")); - o.default = "10"; + o.default = "20"; o.datatype = "range(1,60)"; + o = s.taboption("tab_advanced", form.Value, "curl_max_file_size", _("Curl maximum file size (in bytes)"), + _("If curl is installed and detected, it would not download files bigger than this.")); + o.default = ""; + o.datatype = "uinteger"; + o.rmempty = true; + o = s.taboption("tab_advanced", form.Value, "curl_retry", _("Curl download retry"), _("If curl is installed and detected, it would retry download this many times on timeout/fail.")); o.default = "3"; @@ -138,21 +144,31 @@ return view.extend({ s = m.section(form.NamedSection, "config", "simple-adblock", _("Allowed and Blocked Lists Management")); + o = s.option(form.Value, "dnsmasq_config_file_url", _("Dnsmasq Config File URL"), + _("URL to the external dnsmasq config file, see the %sREADME%s for details.") + .format("<a href=\"" + pkg.URL + "#dnsmasq_config_file_url\" target=\"_blank\">", "</a>")); + o.addremove = true; + o.rmempty = true; o = s.option(form.DynamicList, "allowed_domain", _("Allowed Domains"), _("Individual domains to be allowed.")); - o.addremove = false; + o.depends('dnsmasq_config_file_url', ''); + o.addremove = true; o = s.option(form.DynamicList, "allowed_domains_url", _("Allowed Domain URLs"), _("URLs to lists of domains to be allowed.")); - o.addremove = false; + o.depends('dnsmasq_config_file_url', ''); + o.addremove = true; o = s.option(form.DynamicList, "blocked_domain", _("Blocked Domains"), _("Individual domains to be blocked.")); - o.addremove = false; + o.depends('dnsmasq_config_file_url', ''); + o.addremove = true; o = s.option(form.DynamicList, "blocked_domains_url", _("Blocked Domain URLs"), _("URLs to lists of domains to be blocked.")); - o.addremove = false; + o.depends('dnsmasq_config_file_url', ''); + o.addremove = true; o = s.option(form.DynamicList, "blocked_hosts_url", _("Blocked Hosts URLs"), _("URLs to lists of hosts to be blocked.")); - o.addremove = false; + o.depends('dnsmasq_config_file_url', ''); + o.addremove = true; return Promise.all([status.render(), m.render()]); }) |