luci-app-alist: disable password printing for now

This commit is contained in:
sbwml 2022-09-10 11:32:08 +08:00
parent 743a3a3bc1
commit cc13b279f9
2 changed files with 10 additions and 7 deletions

View File

@ -1,12 +1,12 @@
local m, s local m, s
local sys = require "luci.sys" --local sys = require "luci.sys"
if sys.call("pidof alist >/dev/null") == 0 then --if sys.call("pidof alist >/dev/null") == 0 then
local password = sys.exec("/usr/bin/alist --conf /etc/alist/config.json password 2>&1 | tail -1 | awk -F': ' '{print $2}'") -- local password = sys.exec("/usr/bin/alist --conf /etc/alist/config.json password 2>&1 | tail -1 | awk -F': ' '{print $2}'")
m = Map("alist", translate("Alist"), translate("A file list program that supports multiple storage.") .. " " .. translate("manage password:") .. "<font color=\"green\">" .. password .. "</font>" .. "<br/>" .. [[<a href="https://alist.nn.ci/guide/drivers/local.html" target="_blank">]] .. translate("User Manual") .. [[</a>]]) -- m = Map("alist", translate("Alist"), translate("A file list program that supports multiple storage.") .. " " .. translate("manage password:") .. "<font color=\"green\">" .. password .. "</font>" .. "<br/>" .. [[<a href="https://alist.nn.ci/guide/drivers/local.html" target="_blank">]] .. translate("User Manual") .. [[</a>]])
else --else
m = Map("alist", translate("Alist"), translate("A file list program that supports multiple storage.") .. "<br/>" .. [[<a href="https://alist.nn.ci/guide/drivers/local.html" target="_blank">]] .. translate("User Manual") .. [[</a>]]) m = Map("alist", translate("Alist"), translate("A file list program that supports multiple storage.") .. translate("Default username and password:") .. "<font color=\"green\">admin / admin</font>" .. "<br/>" .. [[<a href="https://alist.nn.ci/guide/drivers/local.html" target="_blank">]] .. translate("User Manual") .. [[</a>]])
end --end
m:section(SimpleSection).template = "alist_status" m:section(SimpleSection).template = "alist_status"

View File

@ -55,3 +55,6 @@ msgstr "用户手册"
#: luci-app-alist/luasrc/model/cbi/alist.lua:35 #: luci-app-alist/luasrc/model/cbi/alist.lua:35
msgid "Allow Access From Internet" msgid "Allow Access From Internet"
msgstr "允许从外网访问" msgstr "允许从外网访问"
msgid "Default username and password:"
msgstr "默认用户名和密码:"