LuCI - OpenWrt Configuration Interface
Revisão | 1eeedd75aa8851aa51d48ca064b44c7bedb64bf3 (tree) |
---|---|
Hora | 2022-05-18 17:21:24 |
Autor | Beginner-Go <70857188+Beginner-Go@user...> |
Commiter | Tianling Shen |
luci-app-iptvhelper: code alignment
(cherry picked from commit 08ab0127484b61aaa2984571b5ee378aea39d6fc)
@@ -16,4 +16,4 @@ LUCI_PKGARCH:=all | ||
16 | 16 | |
17 | 17 | include ../../luci.mk |
18 | 18 | |
19 | -# call BuildPackage - OpenWrt buildroot signature | |
\ No newline at end of file | ||
19 | +# call BuildPackage - OpenWrt buildroot signature |
@@ -11,4 +11,4 @@ function index() | ||
11 | 11 | local page = entry({"admin", "services", "iptvhelper"}, cbi("iptvhelper"), _("IPTV Helper")) |
12 | 12 | page.dependent = true |
13 | 13 | page.acl_depends = { "luci-app-iptvhelper" } |
14 | -end | |
\ No newline at end of file | ||
14 | +end |
@@ -1,34 +1,36 @@ | ||
1 | 1 | -- Copyright 2019 Shun Li <riverscn@gmail.com> |
2 | 2 | -- Licensed to the public under the GNU General Public License v3. |
3 | 3 | |
4 | -local sys = require "luci.sys" | |
5 | - | |
6 | -m = Map("iptvhelper", translate("IPTV Helper"), translate("Help you configure IPTV easily. <a href=\"https://github.com/riverscn/openwrt-iptvhelper\">Github</a>")) | |
4 | +m = Map("iptvhelper", translate("IPTV Helper")) | |
5 | +m.description = translate("Help you configure IPTV easily. <a href=\"https://github.com/riverscn/openwrt-iptvhelper\">Github</a>") | |
7 | 6 | |
8 | 7 | s = m:section(TypedSection, "tvbox", translate("IPTV topbox parameters")) |
9 | 8 | s.addremove = true |
10 | 9 | s.anonymous = false |
11 | 10 | |
12 | -enable=s:option(Flag, "disabled", translate("Enabled")) | |
13 | -enable.enabled = "0" | |
14 | -enable.disabled = "1" | |
15 | -enable.default = "1" | |
16 | -enable.rmempty = false | |
17 | -respawn=s:option(Flag, "respawn", translate("Respawn")) | |
18 | -respawn.default = false | |
19 | -ipset=s:option(Flag, "ipset", translate("Create ipset"), | |
20 | - translate("You can use it in mwan3.")) | |
21 | -ipset.default = true | |
22 | -dns_redir=s:option(Flag, "dns_redir", translate("Redirect topbox's DNS"), | |
23 | - translate("You may need it to jailbreak your topbox.")) | |
24 | -dns_redir.default = false | |
25 | - | |
26 | -host = s:option(Value, "mac", translate("Topbox MAC Address"), | |
27 | - translate("It is usually on the bottom side of topbox.")) | |
28 | -host.rmempty = false | |
29 | -host.datatype = "macaddr" | |
30 | -sys.net.mac_hints(function(mac, name) | |
31 | - host:value(mac, "%s (%s)" %{ mac, name }) | |
11 | +o = s:option(Flag, "disabled", translate("Enabled")) | |
12 | +o.enabled = "0" | |
13 | +o.disabled = "1" | |
14 | +o.default = "1" | |
15 | +o.rmempty = false | |
16 | + | |
17 | +o = s:option(Flag, "respawn", translate("Respawn")) | |
18 | +o.default = false | |
19 | + | |
20 | +o = s:option(Flag, "ipset", translate("Create ipset")) | |
21 | +o.description = translate("You can use it in mwan3.") | |
22 | +o.default = true | |
23 | + | |
24 | +o = s:option(Flag, "dns_redir", translate("Redirect topbox's DNS")) | |
25 | +o.description = translate("You may need it to jailbreak your topbox.") | |
26 | +o.default = false | |
27 | + | |
28 | +o = s:option(Value, "mac", translate("Topbox MAC Address")) | |
29 | +o.description = translate("It is usually on the bottom side of topbox.") | |
30 | +o.rmempty = false | |
31 | +o.datatype = "macaddr" | |
32 | +luci.sys.net.mac_hints(function(mac, name) | |
33 | + o:value(mac, "%s (%s)" %{ mac, name }) | |
32 | 34 | end) |
33 | 35 | |
34 | -return m | |
\ No newline at end of file | ||
36 | +return m |
@@ -9,4 +9,4 @@ uci -q batch <<-EOF >/dev/null | ||
9 | 9 | EOF |
10 | 10 | |
11 | 11 | rm -f /tmp/luci-indexcache |
12 | -exit 0 | |
\ No newline at end of file | ||
12 | +exit 0 |