From d73212a1950dc1505bde55c62c5e33e03d2b84ac Mon Sep 17 00:00:00 2001 From: NewUse <7342068+NewUse@users.noreply.github.com> Date: Fri, 27 Sep 2024 15:50:04 +0300 Subject: [PATCH] Update zapret-tpws.lua fix some mistypes --- .../luasrc/model/cbi/zapret-tpws.lua | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/docs/compile/openwrt/package/zapret/luci-app-zapret-tpws/luasrc/model/cbi/zapret-tpws.lua b/docs/compile/openwrt/package/zapret/luci-app-zapret-tpws/luasrc/model/cbi/zapret-tpws.lua index ff69f51..a6c8edb 100644 --- a/docs/compile/openwrt/package/zapret/luci-app-zapret-tpws/luasrc/model/cbi/zapret-tpws.lua +++ b/docs/compile/openwrt/package/zapret/luci-app-zapret-tpws/luasrc/model/cbi/zapret-tpws.lua @@ -1,23 +1,19 @@ -m = Map("zapret", translate("TPWS Proxy Settings"))c = m:section(NamedSection, "tpws", "zapret", translate("Configuration")) +m = Map("zapret", translate("TPWS Proxy Settings")) +c = m:section(NamedSection, "tpws", "zapret", translate("Configuration")) opt = c:option(Value, "opts", translate("TPWS Options")) opt.placeholder = "--split-pos=2" function opt.validate(self, value) - -- Split the string into words local words = {} for word in value:gmatch("%S+") do table.insert(words, word) end - - -- Check each word for _, word in ipairs(words) do if not word:sub(1, 2) == "--" then - return nil, opt.error = translate("Error: Not all options start with double dash.") + return nil end end - return value end - b = c:option(Flag, "block_quic", "Block QUIC", translate("Block QUIC protocol to come outside")) lp = c:option(Value, "port", translate("Listen Port")) lp.datatype = "port"