luci-app-passwall2: sync upstream

last commit: 722029f756
This commit is contained in:
gitea-action 2025-02-07 14:30:27 +08:00
parent 1888157796
commit 285a913aad
2 changed files with 6 additions and 8 deletions

View File

@ -131,7 +131,7 @@ o:value("ipv6_only", translate("IPv6 Only"))
o = s:option(Button, "_stop", translate("Delete All Subscribe Node")) o = s:option(Button, "_stop", translate("Delete All Subscribe Node"))
o.inputstyle = "remove" o.inputstyle = "remove"
function o.write(e, e) function o.write(e, e)
luci.sys.call("lua /usr/share/" .. appname .. "/subscribe.lua truncate all-node > /dev/null 2>&1") luci.sys.call("lua /usr/share/" .. appname .. "/subscribe.lua truncate > /dev/null 2>&1")
m.no_commit = true m.no_commit = true
end end

View File

@ -1318,13 +1318,11 @@ local function truncate_nodes(add_from)
end end
end end
end) end)
if add_from then uci:foreach(appname, "subscribe_list", function(o)
uci:foreach(appname, "subscribe_list", function(o) if (not add_from) or add_from == o.remark then
if add_from == "all-node" or add_from == o.remark then uci:delete(appname, o['.name'], "md5")
uci:delete(appname, o['.name'], "md5") end
end end)
end)
end
api.uci_save(uci, appname, true) api.uci_save(uci, appname, true)
end end