• R/O
  • HTTP
  • SSH
  • HTTPS

luci: Commit

LuCI - OpenWrt Configuration Interface


Commit MetaInfo

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

Mensagem de Log

luci-app-filetransfer: tidy up code

(cherry picked from commit 796a89a64c1af541aa1d1a4bf6d66d776f11c144)

Mudança Sumário

  • modified: applications/luci-app-filetransfer/Makefile (diff)
  • modified: applications/luci-app-filetransfer/luasrc/controller/filetransfer.lua (diff)
  • delete: applications/luci-app-filetransfer/luasrc/model/cbi/{updownload.lua => filetransfer.lua}
  • delete: applications/luci-app-filetransfer/luasrc/view/{cbi => filetransfer}/other_button.htm
  • delete: applications/luci-app-filetransfer/luasrc/view/{cbi => filetransfer}/other_download.htm
  • delete: applications/luci-app-filetransfer/luasrc/view/{cbi => filetransfer}/other_dvalue.htm
  • delete: applications/luci-app-filetransfer/luasrc/view/{cbi => filetransfer}/other_upload.htm

Diff

--- a/applications/luci-app-filetransfer/Makefile
+++ b/applications/luci-app-filetransfer/Makefile
@@ -12,5 +12,3 @@ LUCI_DEPENDS:=+luci-lib-fs
1212 include ../../luci.mk
1313
1414 # call BuildPackage - OpenWrt buildroot signature
15-
16-
--- a/applications/luci-app-filetransfer/luasrc/controller/filetransfer.lua
+++ b/applications/luci-app-filetransfer/luasrc/controller/filetransfer.lua
@@ -8,5 +8,8 @@ Modify: ayongwifi@126.com www.openwrtdl.com
88 module("luci.controller.filetransfer", package.seeall)
99
1010 function index()
11- entry({"admin", "system", "filetransfer"}, form("updownload"), _("FileTransfer"),89).acl_depends = { "luci-app-filetransfer" }
11+
12+ local page = entry({"admin", "system", "filetransfer"}, form("filetransfer"), _("FileTransfer"), 89)
13+ page.dependent = true
14+ page.acl_depends = { "luci-app-filetransfer" }
1215 end
--- a/applications/luci-app-filetransfer/luasrc/model/cbi/updownload.lua
+++ b/applications/luci-app-filetransfer/luasrc/model/cbi/filetransfer.lua
@@ -6,19 +6,24 @@ ful.reset = false
66 ful.submit = false
77
88 sul = ful:section(SimpleSection, "", translate("Upload file to '/tmp/upload/'"))
9+
910 fu = sul:option(FileUpload, "")
10-fu.template = "cbi/other_upload"
11+fu.template = "filetransfer/other_upload"
12+
1113 um = sul:option(DummyValue, "", nil)
12-um.template = "cbi/other_dvalue"
14+um.template = "filetransfer/other_dvalue"
1315
1416 fdl = SimpleForm("download", translate("Download"), nil)
1517 fdl.reset = false
1618 fdl.submit = false
19+
1720 sdl = fdl:section(SimpleSection, "", translate("Download file"))
21+
1822 fd = sdl:option(FileUpload, "")
19-fd.template = "cbi/other_download"
23+fd.template = "filetransfer/other_download"
24+
2025 dm = sdl:option(DummyValue, "", nil)
21-dm.template = "cbi/other_dvalue"
26+dm.template = "filetransfer/other_dvalue"
2227
2328 function Download()
2429 local sPath, sFile, fd, block
@@ -128,7 +133,7 @@ function IsIpkFile(name)
128133 end
129134
130135 btnis = tb:option(Button, "install", translate("Install"))
131-btnis.template = "cbi/other_button"
136+btnis.template = "filetransfer/other_button"
132137 btnis.render = function(self, section, scope)
133138 if not inits[section] then return false end
134139 if IsIpkFile(inits[section].name) then
Show on old repository browser