luci-app-passwall: sync upstream

last commit: 5a73f2c09c
This commit is contained in:
gitea-action 2025-02-06 18:30:30 +08:00
parent 5489bcd3fd
commit b266779378
2 changed files with 6 additions and 8 deletions

View File

@ -137,7 +137,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

@ -1327,13 +1327,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 add_from == "all-node" or add_from == o.remark then if (not add_from) 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