mirror of
https://github.com/coolsnowwolf/luci
synced 2025-01-09 04:57:28 +08:00
luci-app-aliyundrive-webdav: update to 1.10.1 (#159)
Co-authored-by: messense <messense@icloud.com>
This commit is contained in:
parent
cb4150f053
commit
4b2cd10e24
@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-aliyundrive-webdav
|
||||
PKG_VERSION:=1.8.9
|
||||
PKG_VERSION:=1.10.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
|
@ -17,6 +17,7 @@ function index()
|
||||
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 -- 查询扫码登录结果
|
||||
entry({"admin", "services", "aliyundrive-webdav", "invalidate-cache"}, call("action_invalidate_cache")).leaf = true -- 清除缓存
|
||||
end
|
||||
|
||||
function action_status()
|
||||
@ -56,3 +57,10 @@ function action_query_qrcode()
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json(output)
|
||||
end
|
||||
|
||||
function action_invalidate_cache()
|
||||
local e = {}
|
||||
e.ok = luci.sys.call("kill -HUP `pidof aliyundrive-webdav`") == 0
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json(e)
|
||||
end
|
||||
|
@ -40,6 +40,14 @@ read_buffer_size = e:option(Value, "read_buffer_size", translate("Read Buffer Si
|
||||
read_buffer_size.default = "10485760"
|
||||
read_buffer_size.datatype = "uinteger"
|
||||
|
||||
prefer_http_download = e:option(Flag, "prefer_http_download", translate("Prefer HTTP Download"))
|
||||
prefer_http_download.description = translate("Prefer downloading files using HTTP instead of HTTPS protocol")
|
||||
prefer_http_download.rmempty = false
|
||||
|
||||
no_redirect = e:option(Flag, "no_redirect", translate("Disable Redirect"))
|
||||
no_redirect.description = translate("Disable 302 redirect when using app refresh token")
|
||||
no_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"
|
||||
|
@ -11,11 +11,26 @@ XHR.poll(3, '<%=url([[admin]], [[services]], [[aliyundrive-webdav]], [[status]])
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
function invalidateCache(button) {
|
||||
XHR.get('<%=url([[admin]], [[services]], [[aliyundrive-webdav]], [[invalidate-cache]])%>', null,
|
||||
function(x, data) {
|
||||
if (data.ok) {
|
||||
alert("缓存已清除.");
|
||||
} else {
|
||||
alert("清除缓存失败!");
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
|
||||
<fieldset class="cbi-section">
|
||||
<p id="aliyundrive-webdav_status">
|
||||
<p id="aliyundrive-webdav_status" style="float: left; width: 60%; margin-top: 12px;">
|
||||
<em><%:Collecting data...%></em>
|
||||
</p>
|
||||
<p class="right" style="float: right; width: 40%;">
|
||||
<button class="cbi-button" onclick="event.stopPropagation(); invalidateCache(this);"><%:Invalidate cache%></button>
|
||||
</p>
|
||||
</fieldset>
|
||||
|
@ -49,6 +49,9 @@ msgstr "目录缓存过期时间(单位为秒)"
|
||||
msgid "Collecting data..."
|
||||
msgstr "获取数据中..."
|
||||
|
||||
msgid "Invalidate cache"
|
||||
msgstr "清除缓存"
|
||||
|
||||
msgid "RUNNING"
|
||||
msgstr "运行中"
|
||||
|
||||
@ -93,3 +96,15 @@ msgstr "跳过上传相同大小的文件"
|
||||
|
||||
msgid "Reduce the upload traffic by skipping uploading files with the same size"
|
||||
msgstr "跳过上传相同大小的文件减少上传流量消耗,但可能会导致修改过的同样大小的文件不会被上传"
|
||||
|
||||
msgid "Prefer HTTP Download"
|
||||
msgstr "使用 HTTP 下载"
|
||||
|
||||
msgid "Prefer downloading files using HTTP instead of HTTPS protocol"
|
||||
msgstr "优先使用 HTTP 而不是 HTTPS 协议下载,低端设备上降低 CPU 占用"
|
||||
|
||||
msgid "Disable Redirect"
|
||||
msgstr "禁用重定向"
|
||||
|
||||
msgid "Disable 302 redirect when using app refresh token"
|
||||
msgstr "使用 app refresh token 时禁用 302 重定向"
|
||||
|
Loading…
Reference in New Issue
Block a user