mirror of
https://github.com/tw93/Mole.git
synced 2026-02-15 17:30:05 +00:00
fix: improve status icons and fix spinner cleanup
- Show ✓ for empty trash and discovered versions (normal states) - Fix inline spinner not stopping, causing residual display artifacts
This commit is contained in:
@@ -601,7 +601,7 @@ safe_clean() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$show_spinner" == "true" || "$cleaning_spinner_started" == "true" ]]; then
|
if [[ "$show_spinner" == "true" || "$cleaning_spinner_started" == "true" ]]; then
|
||||||
stop_section_spinner
|
stop_inline_spinner
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local permission_end=${MOLE_PERMISSION_DENIED_COUNT:-0}
|
local permission_end=${MOLE_PERMISSION_DENIED_COUNT:-0}
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ check_multiple_versions() {
|
|||||||
if [[ -n "$list_cmd" ]]; then
|
if [[ -n "$list_cmd" ]]; then
|
||||||
hint=" · ${GRAY}${list_cmd}${NC}"
|
hint=" · ${GRAY}${list_cmd}${NC}"
|
||||||
fi
|
fi
|
||||||
echo -e " ${GRAY}${ICON_WARNING}${NC} ${tool_name}: ${count} found${hint}"
|
echo -e " ${GREEN}${ICON_SUCCESS}${NC} ${tool_name}: ${count} found${hint}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ clean_user_essentials() {
|
|||||||
[[ "$trash_count" =~ ^[0-9]+$ ]] || trash_count="0"
|
[[ "$trash_count" =~ ^[0-9]+$ ]] || trash_count="0"
|
||||||
|
|
||||||
if [[ "$DRY_RUN" == "true" ]]; then
|
if [[ "$DRY_RUN" == "true" ]]; then
|
||||||
[[ $trash_count -gt 0 ]] && echo -e " ${YELLOW}${ICON_DRY_RUN}${NC} Trash · would empty, $trash_count items" || echo -e " ${GRAY}${ICON_EMPTY}${NC} Trash · already empty"
|
[[ $trash_count -gt 0 ]] && echo -e " ${YELLOW}${ICON_DRY_RUN}${NC} Trash · would empty, $trash_count items" || echo -e " ${GREEN}${ICON_SUCCESS}${NC} Trash · already empty"
|
||||||
elif [[ $trash_count -gt 0 ]]; then
|
elif [[ $trash_count -gt 0 ]]; then
|
||||||
if osascript -e 'tell application "Finder" to empty trash' > /dev/null 2>&1; then
|
if osascript -e 'tell application "Finder" to empty trash' > /dev/null 2>&1; then
|
||||||
echo -e " ${GREEN}${ICON_SUCCESS}${NC} Trash · emptied, $trash_count items"
|
echo -e " ${GREEN}${ICON_SUCCESS}${NC} Trash · emptied, $trash_count items"
|
||||||
@@ -23,7 +23,7 @@ clean_user_essentials() {
|
|||||||
safe_clean ~/.Trash/* "Trash"
|
safe_clean ~/.Trash/* "Trash"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo -e " ${GRAY}${ICON_EMPTY}${NC} Trash · already empty"
|
echo -e " ${GREEN}${ICON_SUCCESS}${NC} Trash · already empty"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user