feat(9_upgrade.sh): redesign TUI

This commit is contained in:
sofia
2026-01-20 09:52:08 +08:00
parent f18d0e4f6f
commit dfaf2da168
2 changed files with 733 additions and 439 deletions

View File

@@ -26,8 +26,10 @@ load_lang common
load_lang menu
errornum() {
echo "-----------------------------------------------"
echo -e "\033[31m$MENU_ERR_INPUT\033[0m"
double_line_break
separator_line "="
content_line "\033[31m$MENU_ERR_INPUT\033[0m"
separator_line "="
}
checkrestart() {
@@ -239,24 +241,24 @@ main_menu() {
}
case "$1" in
"")
"")
main_menu
;;
-t)
-t)
shtype=sh && [ -n "$(ls -l /bin/sh | grep -o dash)" ] && shtype=bash
$shtype -x "$CRASHDIR"/menu.sh
;;
-s)
-s)
"$CRASHDIR"/start.sh $2 $3 $4 $5 $6
;;
-i)
-i)
. "$CRASHDIR"/init.sh 2>/dev/null
;;
-st)
-st)
shtype=sh && [ -n "$(ls -l /bin/sh | grep -o dash)" ] && shtype=bash
$shtype -x "$CRASHDIR"/start.sh $2 $3 $4 $5 $6
;;
-d)
-d)
shtype=sh && [ -n "$(ls -l /bin/sh | grep -o dash)" ] && shtype=bash
echo -e "$MENU_TEST_RUNNING\033[32;4mt.me/ShellClash\033[0m"
$shtype "$CRASHDIR"/start.sh debug >/dev/null 2>"$TMPDIR"/debug_sh_bug.log
@@ -277,10 +279,10 @@ case "$1" in
fi
"$CRASHDIR"/start.sh stop
;;
-u)
-u)
. "$CRASHDIR"/menus/uninstall.sh && uninstall
;;
*)
*)
echo -----------------------------------------
echo "$MENU_CLI_WELCOME"
echo -----------------------------------------

File diff suppressed because it is too large Load Diff