luci-app-passwall: sync upstream

last commit: 5f4057f540
This commit is contained in:
gitea-action 2024-12-21 02:00:19 +08:00
parent c08e28d155
commit 4186f2bb6a
3 changed files with 22 additions and 22 deletions

View File

@ -143,14 +143,18 @@ if (has_singbox or has_xray) and #nodes_table > 0 then
end
local function get_write(shunt_node_id, option)
return function(self, section, value)
if s.fields["tcp_node"]:formvalue(section) == shunt_node_id then
m:set(shunt_node_id, option, value)
end
end
end
local function get_remove(shunt_node_id, option)
return function(self, section)
if s.fields["tcp_node"]:formvalue(section) == shunt_node_id then
m:del(shunt_node_id, option)
end
end
end
if #normal_list > 0 then
for k, v in pairs(shunt_list) do
local vid = v.id

View File

@ -26,18 +26,12 @@ table td, .table .td {
}
._now_use {
background: #5e72e445 !important;
color: red !important;
}
.ping a:hover{
text-decoration : underline;
}
@media (prefers-color-scheme: dark) {
._now_use {
background: #4a90e2 !important;
}
}
</style>
<script type="text/javascript">
@ -217,13 +211,12 @@ table td, .table .td {
if (id) {
var dom = document.getElementById("cbi-passwall-" + id);
if (dom) {
dom.classList.add("_now_use");
dom.title = "当前TCP节点";
dom.title = "当前使用的 TCP 节点";
//var v = "<a style='color: red'>当前TCP节点</a>" + document.getElementById("cbid.passwall." + id + ".remarks").value;
//document.getElementById("cbi-passwall-" + id + "-remarks").innerHTML = v;
var tds = dom.getElementsByTagName("td")
for (var j = 0; j < tds.length; j++) {
tds[j].classList.add("_now_use");
var dom_remarks = document.getElementById("cbi-passwall-" + id + "-remarks");
if (dom_remarks) {
dom_remarks.classList.add("_now_use");
}
}
}
@ -231,11 +224,14 @@ table td, .table .td {
if (id) {
var dom = document.getElementById("cbi-passwall-" + id);
if (dom) {
dom.classList.add("_now_use");
dom.title = "当前UDP节点";
var tds = dom.getElementsByTagName("td")
for (var j = 0; j < tds.length; j++) {
tds[j].classList.add("_now_use");
if (result["TCP"] == result["UDP"]) {
dom.title = "当前使用的 TCP/UDP 节点";
} else {
dom.title = "当前使用的 UDP 节点";
}
var dom_remarks = document.getElementById("cbi-passwall-" + id + "-remarks");
if (dom_remarks) {
dom_remarks.classList.add("_now_use");
}
}
}

View File

@ -33,10 +33,10 @@ index 6851861..669a612 100644
if code ~= 0 then
local use_time = luci.sys.exec("echo -n '" .. result .. "' | awk -F ':' '{print $2}'")
diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua
index 958ff0a..89543b9 100644
index 9b0cdb3..bf2c383 100644
--- a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua
+++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua
@@ -474,6 +474,12 @@ o:value("9.9.9.9", "9.9.9.9 (Quad9)")
@@ -478,6 +478,12 @@ o:value("9.9.9.9", "9.9.9.9 (Quad9)")
o:value("149.112.112.112", "149.112.112.112 (Quad9)")
o:value("208.67.220.220", "208.67.220.220 (OpenDNS)")
o:value("208.67.222.222", "208.67.222.222 (OpenDNS)")
@ -49,7 +49,7 @@ index 958ff0a..89543b9 100644
o:depends({dns_mode = "dns2socks"})
o:depends({dns_mode = "tcp"})
o:depends({dns_mode = "udp"})
@@ -565,7 +571,7 @@ if api.is_finded("smartdns") then
@@ -569,7 +575,7 @@ if api.is_finded("smartdns") then
end
o = s:taboption("DNS", Flag, "dns_redirect", translate("DNS Redirect"), translate("Force special DNS server to need proxy devices."))