Merge pull request #1162 from sofia-riese/redesign

feat(9_upgrade.sh): redesign TUI
This commit is contained in:
juewuy
2026-01-20 10:07:00 +08:00
committed by GitHub
2 changed files with 733 additions and 440 deletions

View File

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

File diff suppressed because it is too large Load Diff