diff --git a/doc/lucky1.png b/doc/lucky1.png new file mode 100644 index 00000000..a5b41b6e Binary files /dev/null and b/doc/lucky1.png differ diff --git a/doc/lucky2.png b/doc/lucky2.png new file mode 100644 index 00000000..ba4c026f Binary files /dev/null and b/doc/lucky2.png differ diff --git a/doc/lucky3.png b/doc/lucky3.png new file mode 100644 index 00000000..6fa7982f Binary files /dev/null and b/doc/lucky3.png differ diff --git a/doc/taskplan1.png b/doc/taskplan1.png deleted file mode 100644 index 1f8db7be..00000000 Binary files a/doc/taskplan1.png and /dev/null differ diff --git a/doc/taskplan2.png b/doc/taskplan2.png deleted file mode 100644 index edb45d6d..00000000 Binary files a/doc/taskplan2.png and /dev/null differ diff --git a/doc/taskplan3.png b/doc/taskplan3.png deleted file mode 100644 index d4794702..00000000 Binary files a/doc/taskplan3.png and /dev/null differ diff --git a/doc/view.png b/doc/view.png deleted file mode 100644 index 169e112f..00000000 Binary files a/doc/view.png and /dev/null differ diff --git a/doc/view2.png b/doc/view2.png deleted file mode 100644 index 9058c632..00000000 Binary files a/doc/view2.png and /dev/null differ diff --git a/luci-app-passwall/luasrc/controller/passwall.lua b/luci-app-passwall/luasrc/controller/passwall.lua index 87b1df65..22e07dc2 100644 --- a/luci-app-passwall/luasrc/controller/passwall.lua +++ b/luci-app-passwall/luasrc/controller/passwall.lua @@ -886,17 +886,17 @@ function read_rulelist() end local backup_files = { - "/etc/config/passwall", - "/etc/config/passwall_server", - "/etc/passwall/rules/block_host", - "/etc/passwall/rules/block_ip", - "/etc/passwall/rules/direct_host", - "/etc/passwall/rules/direct_ip", - "/etc/passwall/rules/proxy_host", - "/etc/passwall/rules/proxy_ip", - "/etc/passwall/rules/lanlist_ipv4", - "/etc/passwall/rules/lanlist_ipv6", - "/etc/passwall/rules/domains_excluded" + "/etc/config/passwall", + "/etc/config/passwall_server", + "/etc/passwall/rules/block_host", + "/etc/passwall/rules/block_ip", + "/etc/passwall/rules/direct_host", + "/etc/passwall/rules/direct_ip", + "/etc/passwall/rules/proxy_host", + "/etc/passwall/rules/proxy_ip", + "/etc/passwall/rules/lanlist_ipv4", + "/etc/passwall/rules/lanlist_ipv6", + "/etc/passwall/rules/domains_excluded" } function create_backup() diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/acl_config.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/acl_config.lua index 9f5d2d9d..4b2e49c2 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/acl_config.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/acl_config.lua @@ -172,7 +172,7 @@ o.validate = port_validate ---- UDP No Redir Ports local UDP_NO_REDIR_PORTS = m:get("@global_forwarding[0]", "udp_no_redir_ports") o = s:taboption("Proxy", Value, "udp_no_redir_ports", translate("UDP No Redir Ports"), - "" .. + "" .. translate("Fill in the ports you don't want to be forwarded by the agent, with the highest priority.") .. "") o:value("", translate("Use global config") .. "(" .. UDP_NO_REDIR_PORTS .. ")") diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/node_subscribe.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/node_subscribe.lua index 2904eab2..8762ace1 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/node_subscribe.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/node_subscribe.lua @@ -119,7 +119,7 @@ o.rawhtml = true o.cfgvalue = function(self, section) return string.format([[ ]], - translate("Manual subscription All")) + translate("Manual subscription All")) end s = m:section(TypedSection, "subscribe_list", "", "" .. translate("When adding a new subscription, please save and apply before manually subscribing. If you only change the subscription URL, you can subscribe manually, and the system will save it automatically.") .. "") diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/other.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/other.lua index 94d826d0..437d5280 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/other.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/other.lua @@ -68,9 +68,9 @@ o.validate = port_validate ---- UDP No Redir Ports o = s:option(Value, "udp_no_redir_ports", translate("UDP No Redir Ports"), - "" .. translate( - "Fill in the ports you don't want to be forwarded by the agent, with the highest priority.") .. - "") + "" .. translate( + "Fill in the ports you don't want to be forwarded by the agent, with the highest priority.") .. + "") o.default = "disable" o:value("disable", translate("No patterns are used")) o:value("1:65535", translate("All")) diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/type/0_socks.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/type/0_socks.lua index 23856bad..39900e77 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/type/0_socks.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/type/0_socks.lua @@ -18,7 +18,7 @@ s.type_name = type_name s.option_prefix = "socks_" api.set_type_cbi(s) -o = s:option(ListValue, "del_protocol", "¡¡") --ʼÖÕÒþ²أ¬ÓÃÓÚɾ³ý protocol +o = s:option(ListValue, "del_protocol", " ") --始终隐藏,用于删除 protocol o:depends({ __hide = "1" }) o.rewrite_option = "protocol" diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/type/1_sing-box.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/type/1_sing-box.lua index d5748302..c36f3073 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/type/1_sing-box.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/type/1_sing-box.lua @@ -167,7 +167,7 @@ if load_urltest_options then -- [[ URLTest Start ]] o = s:option(Flag, "urltest_interrupt_exist_connections", translate("Interrupt existing connections")) o:depends({ protocol = "_urltest" }) o.default = "0" - o.description = translate("Interrupt existing connections when the selected outbound has changed.") + o.description = translate("Interrupt existing connections when the selected outbound has changed.") end -- [[ URLTest End ]] if load_iface_options then -- [[ 自定义接口 Start ]] diff --git a/luci-app-passwall/luasrc/passwall/util_sing-box.lua b/luci-app-passwall/luasrc/passwall/util_sing-box.lua index f5421b71..dc45f1b6 100644 --- a/luci-app-passwall/luasrc/passwall/util_sing-box.lua +++ b/luci-app-passwall/luasrc/passwall/util_sing-box.lua @@ -2037,7 +2037,7 @@ function gen_config(var) table.insert(dns.servers, remote_server) fakedns_tag = "remote_fakeip" - if remote_dns_fake or inner_fakedns == "1" then + if remote_dns_fake or inner_fakedns == "1" then table.insert(dns.servers, { tag = fakedns_tag, type = "fakeip", @@ -2178,7 +2178,7 @@ function gen_config(var) local remote_dns_server = api.clone(remote_server) remote_dns_server.tag = value.shunt_tag local is_local = (remote_server.address and api.is_local_ip(remote_server.address)) or - (remote_server.server and api.is_local_ip(remote_server.server)) --dns为本地ip,不走代理 + (remote_server.server and api.is_local_ip(remote_server.server)) --dns为本地ip,不走代理 remote_dns_server.detour = is_local and "direct" or value.outboundTag table.insert(dns.servers, remote_dns_server) dns_rule.server = remote_dns_server.tag diff --git a/luci-app-passwall/luasrc/view/passwall/cbi/nodes_dynamiclist_com.htm b/luci-app-passwall/luasrc/view/passwall/cbi/nodes_dynamiclist_com.htm index cabdaaf2..3a74ce20 100644 --- a/luci-app-passwall/luasrc/view/passwall/cbi/nodes_dynamiclist_com.htm +++ b/luci-app-passwall/luasrc/view/passwall/cbi/nodes_dynamiclist_com.htm @@ -175,7 +175,7 @@ const ctx = canvas.getContext('2d', { willReadFrequently: true }); return function(colorStr) { if (!colorStr) - return null; + return null; ctx.clearRect(0, 0, 1, 1); // 2. Apply the color ctx.fillStyle = colorStr; diff --git a/luci-app-passwall/luasrc/view/passwall/cbi/nodes_listvalue_com.htm b/luci-app-passwall/luasrc/view/passwall/cbi/nodes_listvalue_com.htm index 2a066287..30de14bb 100644 --- a/luci-app-passwall/luasrc/view/passwall/cbi/nodes_listvalue_com.htm +++ b/luci-app-passwall/luasrc/view/passwall/cbi/nodes_listvalue_com.htm @@ -169,7 +169,7 @@ const ctx = canvas.getContext('2d', { willReadFrequently: true }); return function(colorStr) { if (!colorStr) - return null; + return null; ctx.clearRect(0, 0, 1, 1); // 2. Apply the color ctx.fillStyle = colorStr; diff --git a/luci-app-passwall/luasrc/view/passwall/cbi/nodes_multivalue.htm b/luci-app-passwall/luasrc/view/passwall/cbi/nodes_multivalue.htm index 93fa800e..f5c6ea39 100644 --- a/luci-app-passwall/luasrc/view/passwall/cbi/nodes_multivalue.htm +++ b/luci-app-passwall/luasrc/view/passwall/cbi/nodes_multivalue.htm @@ -35,10 +35,10 @@ local groups = {} local group_order = {} for _, item in ipairs(values) do local g = item.group - if not g or g == "" then - g = translate("default") + if not g or g == "" then + g = translate("default") end - if not groups[g] then + if not groups[g] then groups[g] = {} table.insert(group_order, g) end diff --git a/luci-app-passwall/luasrc/view/passwall/cbi/nodes_multivalue_com.htm b/luci-app-passwall/luasrc/view/passwall/cbi/nodes_multivalue_com.htm index 43c6cf3a..9d22aeef 100644 --- a/luci-app-passwall/luasrc/view/passwall/cbi/nodes_multivalue_com.htm +++ b/luci-app-passwall/luasrc/view/passwall/cbi/nodes_multivalue_com.htm @@ -125,7 +125,7 @@ const ctx = canvas.getContext('2d', { willReadFrequently: true }); return function(colorStr) { if (!colorStr) - return null; + return null; ctx.clearRect(0, 0, 1, 1); // 2. Apply the color ctx.fillStyle = colorStr; @@ -258,7 +258,7 @@ const keyword = searchInput.value.trim().toLowerCase(); const isSearching = keyword.length > 0; // 当前实例下的所有 checkbox - const cbs = isSearching + const cbs = isSearching ? Array.from(nodeList.querySelectorAll("input[type=checkbox]")).filter(cb => cb.closest("li").style.display !== "none") : nodeList.querySelectorAll("input[type=checkbox]"); let checked = 0; diff --git a/luci-app-passwall/luasrc/view/passwall/cbi/nodes_value.htm b/luci-app-passwall/luasrc/view/passwall/cbi/nodes_value.htm index 7fe73207..e09e9bce 100644 --- a/luci-app-passwall/luasrc/view/passwall/cbi/nodes_value.htm +++ b/luci-app-passwall/luasrc/view/passwall/cbi/nodes_value.htm @@ -137,7 +137,7 @@ local dropdown_data = { - +
diff --git a/luci-app-passwall/luasrc/view/passwall/cbi/nodes_value_com.htm b/luci-app-passwall/luasrc/view/passwall/cbi/nodes_value_com.htm index 0c5f5c02..920601c5 100644 --- a/luci-app-passwall/luasrc/view/passwall/cbi/nodes_value_com.htm +++ b/luci-app-passwall/luasrc/view/passwall/cbi/nodes_value_com.htm @@ -164,7 +164,7 @@ const ctx = canvas.getContext('2d', { willReadFrequently: true }); return function(colorStr) { if (!colorStr) - return null; + return null; ctx.clearRect(0, 0, 1, 1); // 2. Apply the color ctx.fillStyle = colorStr; diff --git a/luci-app-passwall/luasrc/view/passwall/global/footer.htm b/luci-app-passwall/luasrc/view/passwall/global/footer.htm index ad87dba3..8c9eabfe 100644 --- a/luci-app-passwall/luasrc/view/passwall/global/footer.htm +++ b/luci-app-passwall/luasrc/view/passwall/global/footer.htm @@ -5,11 +5,11 @@ local appname = map.config local sid = "@global[0]" -%> ]] diff --git a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/socks_config.lua b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/socks_config.lua index 65dd0ed8..13dad732 100644 --- a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/socks_config.lua +++ b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/socks_config.lua @@ -160,7 +160,7 @@ o = s:option(Value, "autoswitch_retry_num", translate("Timeout retry num")) o.datatype = "min(1)" o.default = 1 o:depends("enable_autoswitch", true) - + o = s:option(Flag, "autoswitch_restore_switch", translate("Restore Switch"), translate("When detects main node is available, switch back to the main node.")) o:depends("enable_autoswitch", true) diff --git a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/1_sing-box.lua b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/1_sing-box.lua index 83887a53..5a9587fb 100644 --- a/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/1_sing-box.lua +++ b/luci-app-passwall2/luasrc/model/cbi/passwall2/client/type/1_sing-box.lua @@ -715,7 +715,7 @@ if singbox_tags:find("with_utls") then o = s:option(Value, "reality_publicKey", translate("Public Key")) o:depends({ reality = true }) - + o = s:option(Value, "reality_shortId", translate("Short Id")) o:depends({ reality = true }) end diff --git a/luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/1_sing-box.lua b/luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/1_sing-box.lua index 8b1dbff5..2f6c9481 100644 --- a/luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/1_sing-box.lua +++ b/luci-app-passwall2/luasrc/model/cbi/passwall2/server/type/1_sing-box.lua @@ -304,10 +304,10 @@ if singbox_tags:find("with_utls") then o:depends({ protocol = "vless", tls = true }) o:depends({ protocol = "trojan", tls = true }) o:depends({ protocol = "anytls", tls = true }) - + o = s:option(Value, "reality_private_key", translate("Private Key")) o:depends({ reality = true }) - + o = s:option(Value, "reality_shortId", translate("Short Id")) o:depends({ reality = true }) diff --git a/luci-app-passwall2/luasrc/passwall2/api.lua b/luci-app-passwall2/luasrc/passwall2/api.lua index 7211e67c..40bde4ec 100644 --- a/luci-app-passwall2/luasrc/passwall2/api.lua +++ b/luci-app-passwall2/luasrc/passwall2/api.lua @@ -536,7 +536,7 @@ function strToTable(str) if str == nil or type(str) ~= "string" then return {} end - + return loadstring("return " .. str)() end @@ -922,7 +922,7 @@ function clone(org) end end end - + local res = {} copy(org, res) return res diff --git a/luci-app-passwall2/luasrc/passwall2/util_shadowsocks.lua b/luci-app-passwall2/luasrc/passwall2/util_shadowsocks.lua index 83bafd91..0a47ef2d 100644 --- a/luci-app-passwall2/luasrc/passwall2/util_shadowsocks.lua +++ b/luci-app-passwall2/luasrc/passwall2/util_shadowsocks.lua @@ -78,7 +78,7 @@ function gen_config(var) fast_open = (node.tcp_fast_open and node.tcp_fast_open == "1") and true or false, reuse_port = true } - + if node.type == "SSR" then config.protocol = node.protocol config.protocol_param = node.protocol_param @@ -115,7 +115,7 @@ function gen_config(var) }) end end - + return jsonc.stringify(config, 1) end diff --git a/luci-app-passwall2/luasrc/passwall2/util_sing-box.lua b/luci-app-passwall2/luasrc/passwall2/util_sing-box.lua index 5f6e8b27..a73d8949 100644 --- a/luci-app-passwall2/luasrc/passwall2/util_sing-box.lua +++ b/luci-app-passwall2/luasrc/passwall2/util_sing-box.lua @@ -1730,7 +1730,7 @@ function gen_config(var) end end end - + local rule = { action = "route", inbound = inboundTag, @@ -2326,7 +2326,7 @@ function gen_config(var) table.insert(route.rule_set, v) end end - + if inbounds or outbounds then local config = { log = { @@ -2468,7 +2468,7 @@ function gen_proto_config(var) } if outbound then table.insert(outbounds, outbound) end end - + local config = { log = { disabled = true, diff --git a/luci-app-passwall2/luasrc/passwall2/util_xray.lua b/luci-app-passwall2/luasrc/passwall2/util_xray.lua index bf3d6370..1a03a216 100644 --- a/luci-app-passwall2/luasrc/passwall2/util_xray.lua +++ b/luci-app-passwall2/luasrc/passwall2/util_xray.lua @@ -115,7 +115,7 @@ function gen_outbound(flag, node, tag, proxy_table) else dialer_proxy_tag = proxy_tag end - + if node.type == "Xray" then if node.tls and node.tls == "1" then node.stream_security = "tls" @@ -982,7 +982,7 @@ function gen_config(var) local routing = nil local observatory = nil local burstObservatory = nil - local strategy = nil + local strategy = nil local COMMON = {} local CACHE_TEXT_FILE = CACHE_PATH .. "/cache_" .. flag .. ".txt" @@ -1253,7 +1253,7 @@ function gen_config(var) table.insert(rules, { inboundTag = { inbound_tag }, balancerTag = balancer_tag }) return balancer_tag, loopback_outbound end - + function set_outbound_detour(node, outbound, outbounds_table) if not node or not outbound or not outbounds_table then return nil end local default_outTag = outbound.tag @@ -1684,7 +1684,7 @@ function gen_config(var) rules = {} } end - + local dns_host = "" if flag == "global" then dns_host = api.uci_get_c("@global[0]", "dns_hosts") or "" @@ -1708,7 +1708,7 @@ function gen_config(var) end end) end - + local _remote_dns = { tag = remote_dns_tag, queryStrategy = (remote_dns_query_strategy and remote_dns_query_strategy ~= "") and remote_dns_query_strategy or "UseIPv4" @@ -1858,12 +1858,12 @@ function gen_config(var) outboundTag = "dns-out" }) end - + local default_dns_tag_name = remote_dns_tag if not COMMON.default_outbound_tag or COMMON.default_outbound_tag == "direct" then default_dns_tag_name = direct_dns_tag end - + if dns_servers and #dns_servers > 0 then -- Default DNS logic local default_dns_server = nil @@ -2064,7 +2064,7 @@ function gen_config(var) udp_inbound.settings.allowedNetwork = "udp" table.insert(inbounds, udp_inbound) end - + if inbounds or outbounds then local config = { env = (function() @@ -2138,7 +2138,7 @@ function gen_config(var) for index, value in ipairs(config.outbounds) do local s = value.settings if not value["_flag_proxy_tag"] and value["_id"] and s and not NO_RUN and - ((s.vnext and s.vnext[1] and s.vnext[1].address and s.vnext[1].port) or + ((s.vnext and s.vnext[1] and s.vnext[1].address and s.vnext[1].port) or (s.servers and s.servers[1] and s.servers[1].address and s.servers[1].port) or (s.peers and s.peers[1] and s.peers[1].endpoint) or (s.address and s.port)) then @@ -2168,7 +2168,7 @@ function gen_proto_config(var) local server_port = var["server_port"] local server_username = var["server_username"] local server_password = var["server_password"] - + local inbounds = {} local outbounds = {} local routing = nil @@ -2194,7 +2194,7 @@ function gen_proto_config(var) end table.insert(inbounds, inbound) end - + if local_http_address and local_http_port then local inbound = { listen = local_http_address, @@ -2214,7 +2214,7 @@ function gen_proto_config(var) end table.insert(inbounds, inbound) end - + if server_proto ~= "nil" and server_address ~= "nil" and server_port ~= "nil" then local outbound = { protocol = server_proto, @@ -2250,7 +2250,7 @@ function gen_proto_config(var) sockopt = {mark = 255} } }) - + local config = { log = { loglevel = "warning" diff --git a/luci-app-passwall2/luasrc/view/passwall2/cbi/nodes_dynamiclist_com.htm b/luci-app-passwall2/luasrc/view/passwall2/cbi/nodes_dynamiclist_com.htm index 4f932a21..38594857 100644 --- a/luci-app-passwall2/luasrc/view/passwall2/cbi/nodes_dynamiclist_com.htm +++ b/luci-app-passwall2/luasrc/view/passwall2/cbi/nodes_dynamiclist_com.htm @@ -175,7 +175,7 @@ const ctx = canvas.getContext('2d', { willReadFrequently: true }); return function(colorStr) { if (!colorStr) - return null; + return null; ctx.clearRect(0, 0, 1, 1); // 2. Apply the color ctx.fillStyle = colorStr; @@ -213,7 +213,7 @@ if (!rgb) return 'unknown'; // Handle invalid colors // Calculate YIQ brightness (human eye perception) const brightness = ((rgb.r * 299) + (rgb.g * 587) + (rgb.b * 114)) / 1000; - + return brightness > 128 ? 'light' : 'dark'; } diff --git a/luci-app-passwall2/luasrc/view/passwall2/cbi/nodes_listvalue_com.htm b/luci-app-passwall2/luasrc/view/passwall2/cbi/nodes_listvalue_com.htm index 2a066287..30de14bb 100644 --- a/luci-app-passwall2/luasrc/view/passwall2/cbi/nodes_listvalue_com.htm +++ b/luci-app-passwall2/luasrc/view/passwall2/cbi/nodes_listvalue_com.htm @@ -169,7 +169,7 @@ const ctx = canvas.getContext('2d', { willReadFrequently: true }); return function(colorStr) { if (!colorStr) - return null; + return null; ctx.clearRect(0, 0, 1, 1); // 2. Apply the color ctx.fillStyle = colorStr; diff --git a/luci-app-passwall2/luasrc/view/passwall2/cbi/nodes_multivalue.htm b/luci-app-passwall2/luasrc/view/passwall2/cbi/nodes_multivalue.htm index fabcf77e..8e52206c 100644 --- a/luci-app-passwall2/luasrc/view/passwall2/cbi/nodes_multivalue.htm +++ b/luci-app-passwall2/luasrc/view/passwall2/cbi/nodes_multivalue.htm @@ -35,10 +35,10 @@ local groups = {} local group_order = {} for _, item in ipairs(values) do local g = item.group - if not g or g == "" then - g = translate("default") + if not g or g == "" then + g = translate("default") end - if not groups[g] then + if not groups[g] then groups[g] = {} table.insert(group_order, g) end diff --git a/luci-app-passwall2/luasrc/view/passwall2/cbi/nodes_multivalue_com.htm b/luci-app-passwall2/luasrc/view/passwall2/cbi/nodes_multivalue_com.htm index 646f691b..9d22aeef 100644 --- a/luci-app-passwall2/luasrc/view/passwall2/cbi/nodes_multivalue_com.htm +++ b/luci-app-passwall2/luasrc/view/passwall2/cbi/nodes_multivalue_com.htm @@ -125,7 +125,7 @@ const ctx = canvas.getContext('2d', { willReadFrequently: true }); return function(colorStr) { if (!colorStr) - return null; + return null; ctx.clearRect(0, 0, 1, 1); // 2. Apply the color ctx.fillStyle = colorStr; @@ -163,7 +163,7 @@ if (!rgb) return 'unknown'; // Handle invalid colors // Calculate YIQ brightness (human eye perception) const brightness = ((rgb.r * 299) + (rgb.g * 587) + (rgb.b * 114)) / 1000; - + return brightness > 128 ? 'light' : 'dark'; } @@ -258,7 +258,7 @@ const keyword = searchInput.value.trim().toLowerCase(); const isSearching = keyword.length > 0; // 当前实例下的所有 checkbox - const cbs = isSearching + const cbs = isSearching ? Array.from(nodeList.querySelectorAll("input[type=checkbox]")).filter(cb => cb.closest("li").style.display !== "none") : nodeList.querySelectorAll("input[type=checkbox]"); let checked = 0; diff --git a/luci-app-passwall2/luasrc/view/passwall2/cbi/nodes_value.htm b/luci-app-passwall2/luasrc/view/passwall2/cbi/nodes_value.htm index 7fe73207..e09e9bce 100644 --- a/luci-app-passwall2/luasrc/view/passwall2/cbi/nodes_value.htm +++ b/luci-app-passwall2/luasrc/view/passwall2/cbi/nodes_value.htm @@ -137,7 +137,7 @@ local dropdown_data = {
- +
diff --git a/luci-app-passwall2/luasrc/view/passwall2/cbi/nodes_value_com.htm b/luci-app-passwall2/luasrc/view/passwall2/cbi/nodes_value_com.htm index 0c5f5c02..920601c5 100644 --- a/luci-app-passwall2/luasrc/view/passwall2/cbi/nodes_value_com.htm +++ b/luci-app-passwall2/luasrc/view/passwall2/cbi/nodes_value_com.htm @@ -164,7 +164,7 @@ const ctx = canvas.getContext('2d', { willReadFrequently: true }); return function(colorStr) { if (!colorStr) - return null; + return null; ctx.clearRect(0, 0, 1, 1); // 2. Apply the color ctx.fillStyle = colorStr; diff --git a/luci-app-passwall2/luasrc/view/passwall2/cbi/sortable.htm b/luci-app-passwall2/luasrc/view/passwall2/cbi/sortable.htm index 2f90bf8c..45c0fcf7 100644 --- a/luci-app-passwall2/luasrc/view/passwall2/cbi/sortable.htm +++ b/luci-app-passwall2/luasrc/view/passwall2/cbi/sortable.htm @@ -36,7 +36,7 @@ local appname = self.appname or map.config background-color: rgba(131, 191, 255, 0.7) !important; box-shadow: 0 4px 6px rgba(0,0,0,0.1); } - + @media screen and (max-width: 1152px) { #cbi-<%=appname%>-<%=sectiontype%> .cbi-section-table-titles { display: none !important; @@ -116,7 +116,7 @@ local appname = self.appname or map.config hiddenInput.value = changed ? newOrder.join(" ") : ""; } } - + // hide lua luci version up/down function hideSortColumn(section) { var table = section.getElementsByTagName("table")[0]; diff --git a/luci-app-passwall2/luasrc/view/passwall2/global/backup.htm b/luci-app-passwall2/luasrc/view/passwall2/global/backup.htm index dc13e726..f53c6636 100644 --- a/luci-app-passwall2/luasrc/view/passwall2/global/backup.htm +++ b/luci-app-passwall2/luasrc/view/passwall2/global/backup.htm @@ -153,7 +153,7 @@ local api = map.api if (confirm("<%: Are you sure you want to restore the client to default settings?%>")) { const xhr = new XMLHttpRequest(); xhr.open("GET",'<%= api.url("reset_config") %>', false); - xhr.send(); + xhr.send(); window.location.href = '<%= api.url("log") %>' } }, 1000); diff --git a/luci-app-passwall2/luasrc/view/passwall2/global/faq.htm b/luci-app-passwall2/luasrc/view/passwall2/global/faq.htm index 60044c8a..416ec508 100644 --- a/luci-app-passwall2/luasrc/view/passwall2/global/faq.htm +++ b/luci-app-passwall2/luasrc/view/passwall2/global/faq.htm @@ -4,25 +4,25 @@ local api = map.api -%>