luci-app-ssr-plus: change "Apply "to "Reapply" when the node is used
@@ -109,8 +109,18 @@ o = s:option(DummyValue, "server", translate("Ping Latency"))
o.template = "shadowsocksr/ping"
o.width = "10%"
+local global_server = uci:get_first('shadowsocksr', 'global', 'global_server')
+
node = s:option(Button, "apply_node", translate("Apply"))
node.inputstyle = "apply"
+node.render = function(self, section, scope)
+ if section == global_server then
+ self.title = translate("Reapply")
+ else
+ self.title = translate("Apply")
+ end
+ Button.render(self, section, scope)
+end
node.write = function(self, section)
uci:set("shadowsocksr", '@global[0]', 'global_server', section)
uci:save("shadowsocksr")
