luci-app-aliyundrive-webdav: update to 1.7.1

Signed-off-by: Beginner-Go <70857188+Beginner-Go@users.noreply.github.com>
This commit is contained in:
messense 2022-07-05 18:14:56 +00:00 committed by Beginner-Go
parent 85fbcddef9
commit fbf4e87228
5 changed files with 183 additions and 4 deletions

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-aliyundrive-webdav
PKG_VERSION:=1.6.2
PKG_VERSION:=1.7.1
PKG_RELEASE:=1
PKG_LICENSE:=MIT

View File

@ -15,6 +15,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 +40,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

View File

@ -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

View File

@ -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 "限制只能访问该云盘目录,默认为 / 表示不限制,注意这个参数不是本地磁盘路径"