mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-10 23:41:22 +00:00
~Improve UI
This commit is contained in:
@@ -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="已设置"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 "\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 "="
|
||||
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 "="
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user