1、隐藏首页格式化按钮 防止误操作

2、修改登录按钮为中文
This commit is contained in:
悟空的日常镜像仓库 2025-05-19 16:35:36 +08:00
parent e1a5b19cb2
commit eea92433de

View File

@ -63,7 +63,7 @@ do_istore() {
# 安装所有下载的 .ipk 包
opkg install ./*.ipk
#覆盖 bin/is-opkg
#覆盖 bin/is-opkg
wget -O /bin/is-opkg https://cafe.cpolar.top/wkdaily/be3600/raw/branch/master/64bit/is-opkg.sh
chmod +x /bin/is-opkg
@ -80,6 +80,7 @@ do_quickstart() {
download_lib_quickstart
download_luci_quickstart
opkg install /tmp/ipk_downloads/*.ipk
hide_homepage_format_button
green "首页风格安装完毕请使用8080端口访问luci界面http://192.168.8.1:8080"
green "作者更多动态务必收藏https://tvhelper.cpolar.top/"
}
@ -241,6 +242,7 @@ do_install_argon_skin() {
uci set luci.main.mediaurlbase='/luci-static/argon'
uci set luci.main.lang='zh_cn'
uci commit
sed -i 's/value="<%:Login%>"/value="登录"/' /usr/lib/lua/luci/view/themes/argon/sysauth.htm
echo "重新登录web页面后, 查看新主题 "
else
echo "argon主题 安装失败! 建议再执行一次!再给我一个机会!事不过三!"
@ -263,13 +265,34 @@ recovery() {
fi
}
add_arch_64bit(){
if ! wget -O /etc/opkg/arch.conf https://cafe.cpolar.top/wkdaily/be3600/raw/branch/master/64bit/arch.conf; then
echo "下载 arch.conf 失败,脚本终止。"
exit 1
fi
add_arch_64bit() {
if ! wget -O /etc/opkg/arch.conf https://cafe.cpolar.top/wkdaily/be3600/raw/branch/master/64bit/arch.conf; then
echo "下载 arch.conf 失败,脚本终止。"
exit 1
fi
}
# 防止误操作 隐藏首页的格式化按钮
hide_homepage_format_button() {
TARGET="/www/luci-static/quickstart/style.css"
MARKER="/* hide quickstart disk button */"
# 如果没有追加过,就添加
if ! grep -q "$MARKER" "$TARGET"; then
cat <<EOF >>"$TARGET"
$MARKER
.value-data button {
display: none !important;
}
EOF
echo "✅ 格式化按钮已隐藏"
else
echo "⚠️ 无需重复操作"
fi
}
while true; do
clear
@ -291,6 +314,8 @@ while true; do
echo
light_magenta " 5. 单独安装iStore商店"
echo
light_magenta " 6. 隐藏首页格式化按钮"
echo
echo " Q. 退出本程序"
echo
read -p "请选择一个选项: " choice
@ -316,9 +341,14 @@ while true; do
#安装首页和网络向导
do_quickstart
;;
4) do_install_argon_skin
4)
do_install_argon_skin
;;
5) do_istore
5)
do_istore
;;
6)
hide_homepage_format_button
;;
q | Q)
echo "退出"