From cc13b279f9063c6f9a619150712b0c861f8b816d Mon Sep 17 00:00:00 2001
From: sbwml <984419930@qq.com>
Date: Sat, 10 Sep 2022 11:32:08 +0800
Subject: [PATCH] luci-app-alist: disable password printing for now
---
luci-app-alist/luasrc/model/cbi/alist.lua | 14 +++++++-------
luci-app-alist/po/zh-cn/alist.po | 3 +++
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/luci-app-alist/luasrc/model/cbi/alist.lua b/luci-app-alist/luasrc/model/cbi/alist.lua
index 8bdb60c..59bb815 100644
--- a/luci-app-alist/luasrc/model/cbi/alist.lua
+++ b/luci-app-alist/luasrc/model/cbi/alist.lua
@@ -1,12 +1,12 @@
local m, s
-local sys = require "luci.sys"
+--local sys = require "luci.sys"
-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}'")
- m = Map("alist", translate("Alist"), translate("A file list program that supports multiple storage.") .. " " .. translate("manage password:") .. "" .. password .. "" .. "
" .. [[]] .. translate("User Manual") .. [[]])
-else
- m = Map("alist", translate("Alist"), translate("A file list program that supports multiple storage.") .. "
" .. [[]] .. translate("User Manual") .. [[]])
-end
+--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}'")
+-- m = Map("alist", translate("Alist"), translate("A file list program that supports multiple storage.") .. " " .. translate("manage password:") .. "" .. password .. "" .. "
" .. [[]] .. translate("User Manual") .. [[]])
+--else
+ m = Map("alist", translate("Alist"), translate("A file list program that supports multiple storage.") .. translate("Default username and password:") .. "admin / admin" .. "
" .. [[]] .. translate("User Manual") .. [[]])
+--end
m:section(SimpleSection).template = "alist_status"
diff --git a/luci-app-alist/po/zh-cn/alist.po b/luci-app-alist/po/zh-cn/alist.po
index 3f59f8c..db8ec74 100644
--- a/luci-app-alist/po/zh-cn/alist.po
+++ b/luci-app-alist/po/zh-cn/alist.po
@@ -55,3 +55,6 @@ msgstr "用户手册"
#: luci-app-alist/luasrc/model/cbi/alist.lua:35
msgid "Allow Access From Internet"
msgstr "允许从外网访问"
+
+msgid "Default username and password:"
+msgstr "默认用户名和密码:"