From 2fa0eddff0c4b0ccdceb598148ec777a4eb95d73 Mon Sep 17 00:00:00 2001 From: zxlhhyccc Date: Sat, 5 Jul 2025 14:57:24 +0800 Subject: [PATCH] luci-app-ssr-plus: Add save and apply after successful, jump to the node list --- .../model/cbi/shadowsocksr/client-config.lua | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua index 33da0b65..068c2847 100644 --- a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua +++ b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua @@ -22,6 +22,22 @@ local function is_installed(e) return luci.model.ipkg.installed(e) end +local function showMsg_Redirect(redirectUrl, delay) + local redirectUrl = redirectUrl or "" + local delay = delay or 3000 + luci.http.write([[ + + ]]) +end + local has_ss_rust = is_finded("sslocal") or is_finded("ssserver") local has_ss_libev = is_finded("ss-redir") or is_finded("ss-local") @@ -137,6 +153,11 @@ if m.uci:get("shadowsocksr", sid) ~= "servers" then luci.http.redirect(m.redirect) return end +-- 保存&应用成功后跳转到节点列表 +m.apply_on_parse = true +m.on_after_apply = function(self) + showMsg_Redirect(self.redirect, 4500) +end -- [[ Servers Setting ]]-- s = m:section(NamedSection, sid, "servers")