1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 12:41:46 +00:00
This commit is contained in:
Tw93
2025-11-15 10:01:21 +08:00
parent 72caed7da2
commit 1cb87c67e8
5 changed files with 8 additions and 8 deletions

View File

@@ -142,7 +142,7 @@ show_menu() {
echo ""
show_status
if is_touchid_configured; then
echo -ne "${PURPLE}${NC} Press ${GREEN}Enter${NC} to disable, ${GRAY}ESC${NC} to quit: "
echo -ne "${PURPLE}${NC} Press ${GREEN}Enter${NC} to disable, ${GRAY}Q${NC} to quit: "
IFS= read -r -s -n1 key || key=""
echo ""
@@ -160,7 +160,7 @@ show_menu() {
;;
esac
else
echo -ne "${PURPLE}${NC} Press ${GREEN}Enter${NC} to enable, ${GRAY}ESC${NC} to quit: "
echo -ne "${PURPLE}${NC} Press ${GREEN}Enter${NC} to enable, ${GRAY}Q${NC} to quit: "
IFS= read -r -s -n1 key || key=""
case "$key" in

View File

@@ -296,7 +296,7 @@ read_key() {
$'\x7f' | $'\x08') echo "DELETE" ;; # Backspace/Delete key
$'\x1b')
# ESC sequence - could be arrow key, delete key, or ESC alone
# Read the next two bytes within 1s
# Read the next bytes with 1s timeout for maximum compatibility
if IFS= read -r -s -n 1 -t 1 rest 2> /dev/null; then
if [[ "$rest" == "[" ]]; then
# Got ESC [, read next character

View File

@@ -461,7 +461,7 @@ paginated_multi_select() {
"${GRAY}${ICON_NAV_UP}/${ICON_NAV_DOWN}${NC} Navigate"
"${GRAY}Space${NC} Select"
"${GRAY}Enter${NC} Confirm"
"${GRAY}Q/ESC${NC} Quit"
"${GRAY}Q${NC} Quit"
)
_print_wrapped_controls "$sep" "${_segs_basic[@]}"
local -a _segs_advanced=(
@@ -477,7 +477,7 @@ paginated_multi_select() {
"${GRAY}Space${NC} Select"
"${GRAY}Enter${NC} Confirm"
"${GRAY}/${NC} Filter"
"${GRAY}Q/ESC${NC} Quit"
"${GRAY}Q${NC} Quit"
)
_print_wrapped_controls "$sep" "${_segs_simple[@]}"
fi

View File

@@ -124,7 +124,7 @@ paginated_multi_select() {
if [[ $total_items -eq 0 ]]; then
printf "${clear_line}${GRAY}No items available${NC}\n" >&2
printf "${clear_line}\n" >&2
printf "${clear_line}${GRAY}Q/ESC${NC} Quit\n" >&2
printf "${clear_line}${GRAY}Q${NC} Quit\n" >&2
printf "${clear_line}" >&2
return
fi
@@ -168,7 +168,7 @@ paginated_multi_select() {
# Clear any remaining lines at bottom
printf "${clear_line}\n" >&2
printf "${clear_line}${GRAY}${ICON_NAV_UP}/${ICON_NAV_DOWN}${NC} Navigate ${GRAY}|${NC} ${GRAY}Space${NC} Select ${GRAY}|${NC} ${GRAY}Enter${NC} Confirm ${GRAY}|${NC} ${GRAY}Q/ESC${NC} Quit\n" >&2
printf "${clear_line}${GRAY}${ICON_NAV_UP}/${ICON_NAV_DOWN}${NC} Navigate ${GRAY}|${NC} ${GRAY}Space${NC} Select ${GRAY}|${NC} ${GRAY}Enter${NC} Confirm ${GRAY}|${NC} ${GRAY}Q${NC} Quit\n" >&2
# Clear one more line to ensure no artifacts
printf "${clear_line}" >&2

2
mole
View File

@@ -460,7 +460,7 @@ show_main_menu() {
if [[ -t 0 ]]; then
printf '\r\033[2K\n'
printf '\r\033[2K%s\n' " ${GRAY}↑/↓${NC} Navigate ${GRAY}|${NC} ${GRAY}Enter${NC} Select ${GRAY}|${NC} ${GRAY}H${NC} Help ${GRAY}|${NC} ${GRAY}ESC${NC} Quit"
printf '\r\033[2K%s\n' " ${GRAY}↑/↓${NC} Navigate ${GRAY}|${NC} ${GRAY}Enter${NC} Select ${GRAY}|${NC} ${GRAY}H${NC} Help ${GRAY}|${NC} ${GRAY}Q${NC} Quit"
printf '\r\033[2K\n'
fi