• R/O
  • HTTP
  • SSH
  • HTTPS

luci: Commit

LuCI - OpenWrt Configuration Interface


Commit MetaInfo

Revisão1eeedd75aa8851aa51d48ca064b44c7bedb64bf3 (tree)
Hora2022-05-18 17:21:24
AutorBeginner-Go <70857188+Beginner-Go@user...>
CommiterTianling Shen

Mensagem de Log

luci-app-iptvhelper: code alignment

(cherry picked from commit 08ab0127484b61aaa2984571b5ee378aea39d6fc)

Mudança Sumário

Diff

--- a/applications/luci-app-iptvhelper/Makefile
+++ b/applications/luci-app-iptvhelper/Makefile
@@ -16,4 +16,4 @@ LUCI_PKGARCH:=all
1616
1717 include ../../luci.mk
1818
19-# call BuildPackage - OpenWrt buildroot signature
\ No newline at end of file
19+# call BuildPackage - OpenWrt buildroot signature
--- a/applications/luci-app-iptvhelper/luasrc/controller/iptvhelper.lua
+++ b/applications/luci-app-iptvhelper/luasrc/controller/iptvhelper.lua
@@ -11,4 +11,4 @@ function index()
1111 local page = entry({"admin", "services", "iptvhelper"}, cbi("iptvhelper"), _("IPTV Helper"))
1212 page.dependent = true
1313 page.acl_depends = { "luci-app-iptvhelper" }
14-end
\ No newline at end of file
14+end
--- a/applications/luci-app-iptvhelper/luasrc/model/cbi/iptvhelper.lua
+++ b/applications/luci-app-iptvhelper/luasrc/model/cbi/iptvhelper.lua
@@ -1,34 +1,36 @@
11 -- Copyright 2019 Shun Li <riverscn@gmail.com>
22 -- Licensed to the public under the GNU General Public License v3.
33
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>")
76
87 s = m:section(TypedSection, "tvbox", translate("IPTV topbox parameters"))
98 s.addremove = true
109 s.anonymous = false
1110
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 })
3234 end)
3335
34-return m
\ No newline at end of file
36+return m
--- a/applications/luci-app-iptvhelper/root/etc/uci-defaults/40_iptvhelper
+++ b/applications/luci-app-iptvhelper/root/etc/uci-defaults/40_iptvhelper
@@ -9,4 +9,4 @@ uci -q batch <<-EOF >/dev/null
99 EOF
1010
1111 rm -f /tmp/luci-indexcache
12-exit 0
\ No newline at end of file
12+exit 0
Show on old repository browser