mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-31 01:35:13 +08:00
⛅ Sync 2026-09-05 14:47:29
This commit is contained in:
1 parent
542a97782d
commit
c5b7496c5d
19 files changed
+219
-230
No files matched your search
@@ -8,11 +8,6 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=LuCI page for IPK upload
|
||||
LUCI_DEPENDS:=+luci-lib-fs
|
||||
LUCI_PKGARCH:=all
|
||||
|
||||
PKG_NAME:=luci-app-filetransfer
|
||||
PKG_VERSION:=1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
|
||||
@@ -9,5 +9,7 @@ module("luci.controller.filetransfer", package.seeall)
|
||||
|
||||
function index()
|
||||
|
||||
entry({"admin", "system", "filetransfer"}, form("filetransfer"), _("FileTransfer"), 89).dependent = true
|
||||
local page = entry({"admin", "system", "filetransfer"}, form("filetransfer"), _("FileTransfer"), 89)
|
||||
page.dependent = true
|
||||
page.acl_depends = { "luci-app-filetransfer" }
|
||||
end
|
||||
@@ -91,16 +91,6 @@ elseif luci.http.formvalue("download") then
|
||||
Download()
|
||||
end
|
||||
|
||||
local function getSizeStr(size)
|
||||
local i = 0
|
||||
local byteUnits = {' kB', ' MB', ' GB', ' TB'}
|
||||
repeat
|
||||
size = size / 1024
|
||||
i = i + 1
|
||||
until(size <= 1024)
|
||||
return string.format("%.1f", size) .. byteUnits[i]
|
||||
end
|
||||
|
||||
local inits, attr = {}
|
||||
for i, f in ipairs(fs.glob("/tmp/upload/*")) do
|
||||
attr = fs.stat(f)
|
||||
@@ -109,7 +99,7 @@ for i, f in ipairs(fs.glob("/tmp/upload/*")) do
|
||||
inits[i].name = fs.basename(f)
|
||||
inits[i].mtime = os.date("%Y-%m-%d %H:%M:%S", attr.mtime)
|
||||
inits[i].modestr = attr.modestr
|
||||
inits[i].size = getSizeStr(attr.size)
|
||||
inits[i].size = tostring(attr.size)
|
||||
inits[i].remove = 0
|
||||
inits[i].install = false
|
||||
end
|
||||
@@ -122,9 +112,8 @@ form.submit = false
|
||||
tb = form:section(Table, inits)
|
||||
nm = tb:option(DummyValue, "name", translate("File name"))
|
||||
mt = tb:option(DummyValue, "mtime", translate("Modify time"))
|
||||
ms = tb:option(DummyValue, "modestr", translate("Attributes"))
|
||||
ms = tb:option(DummyValue, "modestr", translate("Mode string"))
|
||||
sz = tb:option(DummyValue, "size", translate("Size"))
|
||||
|
||||
btnrm = tb:option(Button, "remove", translate("Remove"))
|
||||
btnrm.render = function(self, section, scope)
|
||||
self.inputstyle = "remove"
|
||||
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
zh_Hans
|
||||
@@ -1 +0,0 @@
|
||||
zh-cn
|
||||
+5
-15
@@ -1,15 +1,5 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Project-Id-Version: \n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: dingpengyu <dingpengyu06@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: zh_CN\n"
|
||||
"X-Generator: Poedit 2.3.1\n"
|
||||
msgstr "Content-Type: text/plain; charset=UTF-8"
|
||||
|
||||
msgid "Choose local file:"
|
||||
msgstr "选择本地文件:"
|
||||
@@ -38,17 +28,17 @@ msgstr "文件传输"
|
||||
msgid "Install"
|
||||
msgstr "安装"
|
||||
|
||||
msgid "Attributes"
|
||||
msgstr "属性"
|
||||
msgid "Mode string"
|
||||
msgstr "模式字符串"
|
||||
|
||||
msgid "Modify time"
|
||||
msgstr "修改时间"
|
||||
|
||||
msgid "No specify upload file."
|
||||
msgstr "未指定上传文件。"
|
||||
msgstr "未指定上传文件"
|
||||
|
||||
msgid "Path on Route:"
|
||||
msgstr "路由根目录:"
|
||||
msgstr "路由上目录"
|
||||
|
||||
msgid "Remove"
|
||||
msgstr "移除"
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
sed -i 's/cbi.submit\"] = true/cbi.submit\"] = \"1\"/g' /usr/lib/lua/luci/dispatcher.lua
|
||||
|
||||
rm -f /tmp/luci-indexcache
|
||||
exit 0
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"luci-app-filetransfer": {
|
||||
"description": "Grant UCI access for luci-app-filetransfer",
|
||||
"read": {
|
||||
"uci": [ "filetransfer" ]
|
||||
},
|
||||
"write": {
|
||||
"uci": [ "filetransfer" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user