mirror of
https://github.com/kenzok8/small-package.git
synced 2026-02-05 22:36:13 +08:00
update 2022-07-04 23:42:32
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=aliyundrive-webdav
|
||||
PKG_VERSION:=1.7.0
|
||||
PKG_VERSION:=1.7.1
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-aliyundrive-webdav
|
||||
PKG_VERSION:=1.7.0
|
||||
PKG_VERSION:=1.7.1
|
||||
PKG_RELEASE:=1
|
||||
PKG_PO_VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
|
||||
|
||||
|
||||
@@ -6,7 +6,8 @@ function index()
|
||||
end
|
||||
|
||||
local page
|
||||
page = entry({"admin", "services", "aliyundrive-webdav"}, alias("admin", "services", "aliyundrive-webdav", "client"), _("AliyunDrive WebDAV"), 10) -- 首页
|
||||
page = entry({ "admin", "services", "aliyundrive-webdav" }, alias("admin", "services", "aliyundrive-webdav", "client"),
|
||||
_("AliyunDrive WebDAV"), 10) -- 首页
|
||||
page.dependent = true
|
||||
page.acl_depends = { "luci-app-aliyundrive-webdav" }
|
||||
|
||||
@@ -15,6 +16,8 @@ function index()
|
||||
|
||||
entry({ "admin", "services", "aliyundrive-webdav", "status" }, call("action_status")).leaf = true -- 运行状态
|
||||
entry({ "admin", "services", "aliyundrive-webdav", "logtail" }, call("action_logtail")).leaf = true -- 日志采集
|
||||
entry({ "admin", "services", "aliyundrive-webdav", "qrcode" }, call("action_generate_qrcode")).leaf = true -- 生成扫码登录二维码地址和参数
|
||||
entry({ "admin", "services", "aliyundrive-webdav", "query" }, call("action_query_qrcode")).leaf = true -- 查询扫码登录结果
|
||||
end
|
||||
|
||||
function action_status()
|
||||
@@ -38,3 +41,19 @@ function action_logtail()
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json(e)
|
||||
end
|
||||
|
||||
function action_generate_qrcode()
|
||||
local output = luci.sys.exec("aliyundrive-webdav qr generate")
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write(output)
|
||||
end
|
||||
|
||||
function action_query_qrcode()
|
||||
local data = luci.http.formvalue()
|
||||
local t = data.t
|
||||
local ck = data.ck
|
||||
local output = {}
|
||||
output.refresh_token = luci.sys.exec("aliyundrive-webdav qr query --t " .. t .. " --ck " .. ck)
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json(output)
|
||||
end
|
||||
|
||||
@@ -11,7 +11,11 @@ enable = e:option(Flag, "enable", translate("Enable"))
|
||||
enable.rmempty = false
|
||||
|
||||
refresh_token = e:option(Value, "refresh_token", translate("Refresh Token"))
|
||||
refresh_token.description = translate("<a href=\"https://github.com/messense/aliyundrive-webdav#%E8%8E%B7%E5%8F%96-refresh_token\" target=\"_blank\">How to get refresh token</a>")
|
||||
refresh_token.description = translate("Double click the input box above to get refresh token by scanning qrcode")
|
||||
|
||||
qrcode = e:option(DummyValue, '', '')
|
||||
qrcode.rawhtml = true
|
||||
qrcode.template = 'aliyundrive-webdav/aliyundrive-webdav_qrcode'
|
||||
|
||||
root = e:option(Value, "root", translate("Root Directory"))
|
||||
root.description = translate("Restrict access to a folder of aliyundrive, defaults to / which means no restrictions")
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -64,8 +64,8 @@ msgstr "调试模式"
|
||||
msgid "<a href=\"https://github.com/messense/aliyundrive-webdav\" target=\"_blank\">Project GitHub URL</a>"
|
||||
msgstr "<a href=\"https://github.com/messense/aliyundrive-webdav\" target=\"_blank\">GitHub 项目地址</a>"
|
||||
|
||||
msgid "<a href=\"https://github.com/messense/aliyundrive-webdav#%E8%8E%B7%E5%8F%96-refresh_token\" target=\"_blank\">How to get refresh token</a>"
|
||||
msgstr "<a href=\"https://github.com/messense/aliyundrive-webdav#%E8%8E%B7%E5%8F%96-refresh_token\" target=\"_blank\">查看获取 refresh token 的方法</a>"
|
||||
msgid "Double click the input box above to get refresh token by scanning qrcode"
|
||||
msgstr "鼠标双击上面的输入框扫码登录自动获取 refresh token"
|
||||
|
||||
msgid "Restrict access to a folder of aliyundrive, defaults to / which means no restrictions"
|
||||
msgstr "限制只能访问该云盘目录,默认为 / 表示不限制,注意这个参数不是本地磁盘路径"
|
||||
|
||||
Reference in New Issue
Block a user