update 2023-08-11 23:35:19
This commit is contained in:
parent
fb173c55b7
commit
73b6a51fb3
|
@ -6,7 +6,7 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-alist
|
||||
PKG_VERSION:=1.0.10
|
||||
PKG_VERSION:=1.0.11
|
||||
PKG_RELEASE:=1
|
||||
|
||||
LUCI_TITLE:=LuCI support for alist
|
||||
|
|
|
@ -41,8 +41,9 @@ function clear_log()
|
|||
end
|
||||
|
||||
function admin_info()
|
||||
local username = luci.sys.exec("/usr/bin/alist --data $(uci -q get alist.@alist[0].data_dir) password 2>&1 | tail -2 | awk 'NR==1 {print $2}'")
|
||||
local password = luci.sys.exec("/usr/bin/alist --data $(uci -q get alist.@alist[0].data_dir) password 2>&1 | tail -2 | awk 'NR==2 {print $2}'")
|
||||
local random = luci.sys.exec("/usr/bin/alist --data $(uci -q get alist.@alist[0].data_dir) admin random 2>&1")
|
||||
local username = string.match(random, "username: (%S+)")
|
||||
local password = string.match(random, "password: (%S+)")
|
||||
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json({username = username, password = password})
|
||||
|
|
|
@ -86,7 +86,7 @@ o.datatype = "string"
|
|||
o.default = "/tmp/alist"
|
||||
o.rmempty = false
|
||||
|
||||
o = s:option(Button, "admin_info", translate("View Password"))
|
||||
o = s:option(Button, "admin_info", translate("Reset Password"))
|
||||
o.rawhtml = true
|
||||
o.template = "alist/admin_info"
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
function admin_info(btn)
|
||||
{
|
||||
btn.disabled = true;
|
||||
btn.value = '<%:Reading...%>';
|
||||
btn.value = '<%:Collecting data...%>';
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "nas", "alist", "admin_info")%>',
|
||||
null,
|
||||
function(x,rv)
|
||||
|
@ -15,12 +15,12 @@
|
|||
tb.innerHTML += "<%:Password:%>" + "<font color='green'>" + rv.password + "</font>";
|
||||
}
|
||||
btn.disabled = false;
|
||||
btn.value = '<%:Read%>';
|
||||
btn.value = '<%:Reset%>';
|
||||
}
|
||||
);
|
||||
return false;
|
||||
}
|
||||
//]]></script>
|
||||
<input type="button" class="btn cbi-button cbi-button-apply" value="<%:Read%>" onclick="return admin_info(this)" />
|
||||
<input type="button" class="btn cbi-button cbi-button-apply" value="<%:Reset%>" onclick="return admin_info(this)" />
|
||||
<span id="<%=self.option%>-status"><em><%=self.value%></em></span>
|
||||
<%+cbi/valuefooter%>
|
|
@ -64,8 +64,11 @@ msgstr "启用日志"
|
|||
msgid "Clear logs"
|
||||
msgstr "清空日志"
|
||||
|
||||
msgid "View Password"
|
||||
msgstr "查看密码"
|
||||
msgid "Reset Password"
|
||||
msgstr "重置密码"
|
||||
|
||||
msgid "Reset"
|
||||
msgstr "重置"
|
||||
|
||||
msgid "Username:"
|
||||
msgstr "用户名:"
|
||||
|
@ -73,12 +76,6 @@ msgstr "用户名:"
|
|||
msgid "Password:"
|
||||
msgstr "密码:"
|
||||
|
||||
msgid "Reading..."
|
||||
msgstr "读取中..."
|
||||
|
||||
msgid "Read"
|
||||
msgstr "读取"
|
||||
|
||||
msgid "Login Validity Period (hours)"
|
||||
msgstr "登录有效期(小时)"
|
||||
|
||||
|
|
|
@ -8,8 +8,9 @@ include $(TOPDIR)/rules.mk
|
|||
LUCI_TITLE:=LuCI support for linkease
|
||||
LUCI_DEPENDS:=+linkease
|
||||
LUCI_PKGARCH:=all
|
||||
PKG_VERSION:=2.1.11
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=2.1.12-1
|
||||
# PKG_RELEASE MUST be empty for luci.mk
|
||||
PKG_RELEASE:=
|
||||
LUCI_MINIFY_CSS:=0
|
||||
LUCI_MINIFY_JS:=0
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@ function linkease_backend()
|
|||
if key == "Transfer-Encoding" and val == "chunked" then
|
||||
chunked = 1
|
||||
end
|
||||
if key ~= "Connection" and key ~= "Transfer-Encoding" then
|
||||
if key ~= "Connection" and key ~= "Transfer-Encoding" and key ~= "Content-Length" then
|
||||
http.header(key, val)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue