luci-app-aliyundrive-webdav: update to 2.2.1 (#223)

This commit is contained in:
Saxon 2023-05-03 19:40:46 +08:00 committed by GitHub
parent 24f8cbdf82
commit 33210a2901
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 8 deletions

View File

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

View File

@ -51,10 +51,9 @@ end
function action_query_qrcode()
local data = luci.http.formvalue()
local t = data.t
local ck = data.ck
local sid = data.sid
local output = {}
output.refresh_token = luci.sys.exec("aliyundrive-webdav qr query --t " .. t .. " --ck " .. ck)
output.refresh_token = luci.sys.exec("aliyundrive-webdav qr query --sid " .. sid)
luci.http.prepare_content("application/json")
luci.http.write_json(output)
end

View File

@ -44,6 +44,10 @@ prefer_http_download = e:option(Flag, "prefer_http_download", translate("Prefer
prefer_http_download.description = translate("Prefer downloading files using HTTP instead of HTTPS protocol")
prefer_http_download.rmempty = false
redirect = e:option(Flag, "redirect", translate("Enable 302 Redirect"))
redirect.description = translate("Enable 302 redirect when possible")
redirect.rmempty = false
upload_buffer_size = e:option(Value, "upload_buffer_size", translate("Upload Buffer Size"))
upload_buffer_size.default = "16777216"
upload_buffer_size.datatype = "uinteger"

View File

@ -1,5 +1,5 @@
<%+cbi/valueheader%>
<script src="https://cdn.jsdelivr.net/npm/qrcode_js@1.0.0/qrcode.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
<style>
#mask-box {
z-index: 1000;
@ -113,9 +113,9 @@
// 移除刷新
load.remove();
// 创建二维码
make.makeCode( d.codeContent );
make.makeCode("https://www.aliyundrive.com/o/oauth/authorize?sid=" + d.sid);
// 监听扫码反馈
XHR.poll( 3, '<%=luci.dispatcher.build_url("admin", "services", "aliyundrive-webdav", "query")%>', { t: d.t, ck: d.ck }, ( x, d ) => {
XHR.poll( 3, '<%=luci.dispatcher.build_url("admin", "services", "aliyundrive-webdav", "query")%>', { sid: d.sid }, ( x, d ) => {
if ( d.refresh_token.trim() ) {
// 清除线程
XHR.halt();

View File

@ -68,7 +68,7 @@ msgid "Debug Mode"
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>"
msgstr "<a href=\"https://github.com/messense/aliyundrive-webdav\" target=\"_blank\">GitHub 项目地址</a> | <a href=\"https://t.zsxq.com/0c9sq6Ca8\" target=\"_blank\">加入知识星球</a>"
msgid "Double click the input box above to get refresh token by scanning qrcode"
msgstr "鼠标双击上面的输入框扫码登录自动获取 refresh token"
@ -96,3 +96,9 @@ msgstr "使用 HTTP 下载"
msgid "Prefer downloading files using HTTP instead of HTTPS protocol"
msgstr "优先使用 HTTP 而不是 HTTPS 协议下载,低端设备上降低 CPU 占用"
msgid "Enable 302 Redirect"
msgstr "启用 302 重定向"
msgid "Enable 302 redirect when possible"
msgstr "在可能的情况下启用 302 重定向"