1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-10 04:24:17 +00:00

🎨 Uninstalling and cleaning is a cleaner experience

This commit is contained in:
Tw93
2025-10-04 17:59:12 +08:00
parent a3c3975f5f
commit a830123ac4
5 changed files with 86 additions and 71 deletions

View File

@@ -20,8 +20,18 @@ batch_uninstall_applications() {
local -a app_details=()
echo ""
echo -e "${BLUE}📋 Analyzing selected applications...${NC}"
# Show analyzing message with spinner
local spinner_chars="⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏"
local spinner_idx=0
local analyzed=0
for selected_app in "${selected_apps[@]}"; do
# Update spinner
local spinner_char="${spinner_chars:$((spinner_idx % 10)):1}"
((analyzed++))
echo -ne "\r🗑 ${spinner_char} Analyzing... $analyzed/${#selected_apps[@]}" >&2
((spinner_idx++))
IFS='|' read -r epoch app_path app_name bundle_id size last_used <<< "$selected_app"
# Check if app is running
@@ -47,6 +57,9 @@ batch_uninstall_applications() {
app_details+=("$app_name|$app_path|$bundle_id|$total_kb|$encoded_files")
done
# Clear spinner line
echo -ne "\r\033[K" >&2
# Format size display
if [[ $total_estimated_size -gt 1048576 ]]; then
local size_display=$(echo "$total_estimated_size" | awk '{printf "%.2fGB", $1/1024/1024}')