环境菜单中对自动识别的默认项标注 [自动]

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Cheng Zhou
2026-06-23 22:18:11 +08:00
parent b72b5314a0
commit a81647a4f8
+6 -2
View File
@@ -143,10 +143,14 @@ select_menu() {
local i
for i in "${!options[@]}"; do
local tag="" tag_plain=""
if [[ "$i" -eq "${default_index:-99}" ]]; then
tag=" ${CC_SUCCESS}[自动]${C_RESET}"; tag_plain=" [自动]"
fi
if [[ "$i" -eq "$selected" ]]; then
ctms_box_line "${C_BLUE}${C_BOLD}" "$UI_BOX_WIDTH" "${ICON_BULLET} ${options[$i]}" "${CC_INFO}${C_BOLD}${ICON_BULLET} ${options[$i]}${C_RESET}"
ctms_box_line "${C_BLUE}${C_BOLD}" "$UI_BOX_WIDTH" "${ICON_BULLET} ${options[$i]}${tag_plain}" "${CC_INFO}${C_BOLD}${ICON_BULLET} ${options[$i]}${C_RESET}${tag}"
else
ctms_box_line "${C_BLUE}${C_BOLD}" "$UI_BOX_WIDTH" "${ICON_BULLET_OFF} ${options[$i]}" "${CC_MUTED}${ICON_BULLET_OFF} ${options[$i]}${C_RESET}"
ctms_box_line "${C_BLUE}${C_BOLD}" "$UI_BOX_WIDTH" "${ICON_BULLET_OFF} ${options[$i]}${tag_plain}" "${CC_MUTED}${ICON_BULLET_OFF} ${options[$i]}${C_RESET}${tag}"
fi
done
ctms_box_bottom "${C_BLUE}${C_BOLD}" "$UI_BOX_WIDTH"