mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-10 23:41:22 +00:00
~Change content_list() > list_box()
This commit is contained in:
@@ -21,7 +21,7 @@ set_core_config() {
|
||||
comp_box "\033[30;47m配置文件管理\033[0m"
|
||||
[ -n "$list" ] && {
|
||||
content_line "\033[36m输入数字可管理对应提供者\033[0m"
|
||||
content_list "$list" '...'
|
||||
list_box "$list" '...'
|
||||
separator_line "-"
|
||||
}
|
||||
content_line "a) \033[32m添加提供者\033[0m(支持订阅/分享链接及本地文件)"
|
||||
@@ -164,7 +164,7 @@ setproviders() {
|
||||
done | sort
|
||||
)
|
||||
if [ -n "$list" ];then
|
||||
content_list "$list"
|
||||
list_box "$list"
|
||||
separator_line "-"
|
||||
read -r -p "请选择对应文件或输入具体链接 > " text
|
||||
else
|
||||
|
||||
@@ -42,6 +42,14 @@ btm_box() {
|
||||
separator_line "="
|
||||
}
|
||||
|
||||
list_box () {
|
||||
i=1
|
||||
printf '%s\n' "$1" | while IFS= read -r f; do
|
||||
content_line "$i) $f$2"
|
||||
i=$(( i + 1 ))
|
||||
done
|
||||
}
|
||||
|
||||
# =================================================
|
||||
|
||||
common_back() {
|
||||
|
||||
@@ -47,7 +47,7 @@ providers() {
|
||||
content_line "当前规则模版为:\033[32m$provider_temp_des\033[0m"
|
||||
content_line "\033[33m请选择在线模版:\033[0m"
|
||||
separator_line "-"
|
||||
content_list "$list"
|
||||
list_box "$list"
|
||||
separator_line "-"
|
||||
content_line "a) 使用\033[36m本地模版\033[0m"
|
||||
common_back
|
||||
|
||||
@@ -104,7 +104,7 @@ gen_link_config() { #选择在线规则模版
|
||||
separator_line "-"
|
||||
content_line "当前使用规则为:\033[33m$now\033[0m"
|
||||
separator_line "-"
|
||||
content_list "$list"
|
||||
list_box "$list"
|
||||
separator_line "-"
|
||||
common_back
|
||||
read -r -p "请输入对应数字 > " num
|
||||
@@ -130,7 +130,7 @@ gen_link_server() { #选择Subconverter服务器
|
||||
content_line "\033[32m感谢以下作者的无私奉献!!!\033[0m"
|
||||
content_line "当前使用后端为:\033[33m$now\033[0m"
|
||||
separator_line "-"
|
||||
content_list "$list"
|
||||
list_box "$list"
|
||||
common_back
|
||||
read -r -p "请输入对应数字 > " num
|
||||
totalnum=$(grep -acE '^3|^4' "$CRASHDIR"/configs/servers.list )
|
||||
|
||||
@@ -147,11 +147,4 @@ line_break() {
|
||||
printf "\n\n"
|
||||
}
|
||||
|
||||
content_list() {
|
||||
i=1
|
||||
printf '%s\n' "$1" | while IFS= read -r f; do
|
||||
content_line "$i) $f$2"
|
||||
i=$(( i + 1 ))
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
@@ -15,10 +15,3 @@ line_break() {
|
||||
return
|
||||
}
|
||||
|
||||
content_list() {
|
||||
i=1
|
||||
printf '%s\n' "$1" | while IFS= read -r f; do
|
||||
content_line "$i) $f$2"
|
||||
i=$(( i + 1 ))
|
||||
done
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user