1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 14:26:46 +00:00

Tip content format optimization

This commit is contained in:
Tw93
2025-11-19 11:33:15 +08:00
parent 2a81c38f8f
commit c16047a3a6
5 changed files with 12 additions and 12 deletions

View File

@@ -9,5 +9,5 @@ if [[ -x "$GO_BIN" ]]; then
exec "$GO_BIN" "$@"
fi
echo "Bundled analyzer binary not found. Please reinstall Mole or run 'mo update' to restore it." >&2
echo "Bundled analyzer binary not found. Please reinstall Mole or run mo update to restore it." >&2
exit 1

View File

@@ -489,7 +489,7 @@ start_cleanup() {
if [[ "$DRY_RUN" != "true" && -t 0 ]]; then
echo ""
echo -e "${YELLOW}Tip:${NC} Safety first—run 'mo clean --dry-run'. Important Macs should stop."
echo -e "${YELLOW}${NC} First time? Run ${GRAY}mo clean --dry-run${NC} first to preview changes"
fi
if [[ "$DRY_RUN" == "true" ]]; then
@@ -734,8 +734,8 @@ perform_cleanup() {
start_section "Finder metadata"
if [[ "$PROTECT_FINDER_METADATA" == "true" ]]; then
note_activity
echo -e " ${GRAY}${NC} Finder metadata protected by whitelist."
echo -e " ${GRAY}${NC} Use ${GRAY}mo clean --whitelist${NC} to allow cleaning .DS_Store files."
echo -e " ${YELLOW}${NC} Finder metadata protected by whitelist"
echo -e " ${YELLOW}${NC} Run ${GRAY}mo clean --whitelist${NC} to allow cleaning .DS_Store files"
else
clean_ds_store_tree "$HOME" "Home directory (.DS_Store)"
@@ -965,7 +965,7 @@ perform_cleanup() {
fi
else
# Timeout or error occurred
echo -e " ${YELLOW}${ICON_WARNING}${NC} Homebrew cleanup timed out (run 'brew cleanup' manually)"
echo -e " ${YELLOW}${ICON_WARNING}${NC} Homebrew cleanup timed out (run ${GRAY}brew cleanup${NC} manually)"
fi
else
echo -e " ${YELLOW}${NC} Homebrew (would cleanup)"
@@ -1646,13 +1646,13 @@ perform_cleanup() {
if [[ $node_modules_count -gt 0 ]] || [[ $venv_count -gt 0 ]]; then
if [[ $node_modules_count -gt 0 ]]; then
local nm_gb=$(echo "$node_modules_size" | awk '{printf "%.1f", $1/1024/1024}')
echo -e " ${GRAY}${NC} Found ${YELLOW}${nm_gb}GB${NC} in $node_modules_count old node_modules ${GRAY}(60+ days)${NC}"
echo -e " ${YELLOW}${NC} Found ${YELLOW}${nm_gb}GB${NC} in $node_modules_count old node_modules ${GRAY}(60+ days)${NC}"
fi
if [[ $venv_count -gt 0 ]]; then
local venv_gb=$(echo "$venv_size" | awk '{printf "%.1f", $1/1024/1024}')
echo -e " ${GRAY}${NC} Found ${YELLOW}${venv_gb}GB${NC} in $venv_count old Python venv ${GRAY}(60+ days)${NC}"
echo -e " ${YELLOW}${NC} Found ${YELLOW}${venv_gb}GB${NC} in $venv_count old Python venv ${GRAY}(60+ days)${NC}"
fi
echo -e " ${YELLOW}${NC} Run 'mo analyze' to see details and manually clean"
echo -e " ${YELLOW}${NC} Run ${GRAY}mo analyze${NC} to see details and manually clean"
else
echo -e " ${GREEN}${ICON_SUCCESS}${NC} No large unused project dependencies found"
fi

View File

@@ -594,7 +594,7 @@ main() {
fi
if [[ "$show_touchid_tip" == "true" ]]; then
echo -e "Tip: run 'mo touchid' to approve sudo via Touch ID."
echo -e "${YELLOW}${NC} Run ${GRAY}mo touchid${NC} to approve sudo via Touch ID"
fi
print_summary_block "success" "$summary_title" "${summary_details[@]}"
printf '\n'

View File

@@ -52,7 +52,7 @@ show_status() {
if is_touchid_configured; then
echo -e "${GREEN}${ICON_SUCCESS}${NC} Touch ID is enabled for sudo"
else
echo -e "${YELLOW}${NC} Touch ID is not configured for sudo"
echo -e "${YELLOW}${NC} Touch ID is not configured for sudo"
fi
}

View File

@@ -132,9 +132,9 @@ batch_uninstall_applications() {
local removal_note="Remove ${app_total} ${app_text}"
[[ -n "$size_display" ]] && removal_note+=" (${size_display})"
if [[ ${#running_apps[@]} -gt 0 ]]; then
removal_note+=" - will force quit: ${running_apps[*]}"
removal_note+=" ${YELLOW}[Running]${NC}"
fi
echo -ne "${PURPLE}${ICON_ARROW}${NC} ${removal_note}. Press ${GREEN}Enter${NC} to confirm, ${GRAY}ESC${NC} to cancel: "
echo -ne "${PURPLE}${ICON_ARROW}${NC} ${removal_note} ${GREEN}Enter${NC} confirm, ${GRAY}ESC${NC} cancel: "
IFS= read -r -s -n1 key || key=""
drain_pending_input # Clean up any escape sequence remnants