diff --git a/scripts/lang/chs/menu.lang b/scripts/lang/chs/menu.lang index 25e01531..2d0b37d4 100644 --- a/scripts/lang/chs/menu.lang +++ b/scripts/lang/chs/menu.lang @@ -15,8 +15,7 @@ MENU_OVERRIDE_WARN="你已经禁用了配置文件覆写功能,这会导致大 MENU_OVERRIDE_ASK="是否取消禁用:" # ===== 欢迎与状态 ===== -MENU_WELCOME="欢迎使用ShellCrash" -MENU_VERSION_LABEL="版本:" +MENU_WELCOME="欢迎使用ShellCrash!" MENU_RUN_ON="正在运行" MENU_RUN_SET="已设置" diff --git a/scripts/lang/en/menu.lang b/scripts/lang/en/menu.lang index 421aa035..bded58e7 100644 --- a/scripts/lang/en/menu.lang +++ b/scripts/lang/en/menu.lang @@ -16,7 +16,6 @@ MENU_OVERRIDE_ASK="Cancel the disable setting?" # ===== Welcome & Status ===== MENU_WELCOME="Welcome to ShellCrash!" -MENU_VERSION_LABEL="Ver:" MENU_RUN_ON=" Running" MENU_RUN_SET="Configured" diff --git a/scripts/menu.sh b/scripts/menu.sh index 96b6d254..dad6fced 100644 --- a/scripts/menu.sh +++ b/scripts/menu.sh @@ -139,14 +139,13 @@ ckstatus() { line_break separator_line "=" - content_line " $MENU_WELCOME" - content_line "" - content_line "$(printf "%$((${TABLE_WIDTH:-60} - 1))s" "$MENU_VERSION_LABEL$versionsh_l")" - content_line " $MENU_TG_CHANNEL\033[36;4mhttps://t.me/ShellClash\033[0m" - separator_line "=" + content_line "\033[30;43m$MENU_WELCOME\033[0m" + content_right "Ver: $versionsh_l" + content_line "$MENU_TG_CHANNEL\033[36;4mhttps://t.me/ShellClash\033[0m" + separator_line "-" content_line "$corename$run\t $auto" if [ -n "$PID" ]; then - content_line "$MENU_MEM_USED\033[44m$VmRSS\033[0m\t\t $MENU_RUNNING_TIME\033[46;30m$day\033[44;37m$time\033[0m" + content_line "$MENU_MEM_USED\033[44m$VmRSS\033[0m\t $MENU_RUNNING_TIME\033[46;30m$day\033[44;37m$time\033[0m" fi separator_line "=" diff --git a/scripts/menus/2_settings.sh b/scripts/menus/2_settings.sh index 3d5fe085..11c6b041 100644 --- a/scripts/menus/2_settings.sh +++ b/scripts/menus/2_settings.sh @@ -27,11 +27,10 @@ settings() { content_line "6) $SET_MENU_ADV_PORT" } content_line "8) $SET_MENU_IPV6\t\033[36m$ipv6_redir\033[0m" - content_line "" + separator_line "-" content_line "a) \033[31m$SET_MENU_RESET\033[0m" content_line "b) \033[36m$SET_MENU_LANG\033[0m" content_line "c) \033[33m$SET_MENU_UI\033[0m" - content_line "" content_line "0) $COMMON_BACK" separator_line "=" read -r -p "$COMMON_INPUT> " num diff --git a/scripts/menus/tui_layout.sh b/scripts/menus/tui_layout.sh index 8fac3f05..16ac351a 100644 --- a/scripts/menus/tui_layout.sh +++ b/scripts/menus/tui_layout.sh @@ -113,7 +113,11 @@ content_line() { END {} ' } - +# function for right side text +# color sould be disabled +content_right() { + content_line "$(printf "%$((${TABLE_WIDTH:-60} - 3))s" "$1")" +} # function to print sub content lines # for printing accompanying instructions sub_content_line() { diff --git a/scripts/menus/tui_lite.sh b/scripts/menus/tui_lite.sh index e0e06200..e71234ac 100644 --- a/scripts/menus/tui_lite.sh +++ b/scripts/menus/tui_lite.sh @@ -1,8 +1,13 @@ +TABLE_WIDTH=60 + content_line() { printf '%b' " $1\n" } +content_right() { + printf "%$((TABLE_WIDTH - 13))s\n" "$1" +} sub_content_line() { content_line " $1" }