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

Uniform color specifications

This commit is contained in:
Tw93
2025-12-02 14:45:48 +08:00
parent 8d29a35fc9
commit 8cdf583d85
14 changed files with 40 additions and 36 deletions

Binary file not shown.

View File

@@ -34,10 +34,10 @@ main() {
# Run all checks in parallel with spinner
if [[ -t 1 ]]; then
echo -ne "${PURPLE}System Check${NC} "
echo -ne "${PURPLE_BOLD}System Check${NC} "
start_inline_spinner "Running checks..."
else
echo -e "${PURPLE}System Check${NC}"
echo -e "${PURPLE_BOLD}System Check${NC}"
echo ""
fi

View File

@@ -171,7 +171,7 @@ start_section() {
TRACK_SECTION=1
SECTION_ACTIVITY=0
echo ""
echo -e "${PURPLE}${ICON_ARROW} $1${NC}"
echo -e "${PURPLE_BOLD}${ICON_ARROW} $1${NC}"
}
end_section() {
@@ -369,7 +369,7 @@ safe_clean() {
start_cleanup() {
clear
printf '\n'
echo -e "${PURPLE}Clean Your Mac${NC}"
echo -e "${PURPLE_BOLD}Clean Your Mac${NC}"
echo ""
if [[ "$DRY_RUN" != "true" && -t 0 ]]; then

View File

@@ -17,7 +17,7 @@ source "$SCRIPT_DIR/lib/check/all.sh"
print_header() {
printf '\n'
echo -e "${PURPLE}Optimize and Check${NC}"
echo -e "${PURPLE_BOLD}Optimize and Check${NC}"
echo ""
}
@@ -25,7 +25,7 @@ print_header() {
run_system_checks() {
unset AUTO_FIX_SUMMARY AUTO_FIX_DETAILS
echo ""
echo -e "${PURPLE}System Check${NC}"
echo -e "${PURPLE_BOLD}System Check${NC}"
echo ""
# Check updates - real-time display

Binary file not shown.

View File

@@ -223,12 +223,14 @@ var skipExtensions = map[string]bool{
var spinnerFrames = []string{"|", "/", "-", "\\", "|", "/", "-", "\\"}
const (
colorPurple = "\033[0;35m"
colorGray = "\033[0;90m"
colorRed = "\033[0;31m"
colorYellow = "\033[1;33m"
colorGreen = "\033[0;32m"
colorCyan = "\033[0;36m"
colorReset = "\033[0m"
colorBold = "\033[1m"
colorPurple = "\033[0;35m"
colorPurpleBold = "\033[1;35m"
colorGray = "\033[0;90m"
colorRed = "\033[0;31m"
colorYellow = "\033[0;33m"
colorGreen = "\033[0;32m"
colorBlue = "\033[0;34m"
colorCyan = "\033[0;36m"
colorReset = "\033[0m"
colorBold = "\033[1m"
)

View File

@@ -115,7 +115,7 @@ func coloredProgressBar(value, max int64, percent float64) string {
} else if percent >= 20 {
barColor = colorYellow
} else if percent >= 5 {
barColor = colorCyan
barColor = colorBlue
} else {
barColor = colorGreen
}

View File

@@ -794,7 +794,7 @@ func (m model) View() string {
fmt.Fprintln(&b)
if m.inOverviewMode() {
fmt.Fprintf(&b, "%sAnalyze Disk%s\n", colorPurple, colorReset)
fmt.Fprintf(&b, "%sAnalyze Disk%s\n", colorPurpleBold, colorReset)
if m.overviewScanning {
// Check if we're in initial scan (all entries are pending)
allPending := true
@@ -834,7 +834,7 @@ func (m model) View() string {
}
}
} else {
fmt.Fprintf(&b, "%sAnalyze Disk%s %s%s%s", colorPurple, colorReset, colorGray, displayPath(m.path), colorReset)
fmt.Fprintf(&b, "%sAnalyze Disk%s %s%s%s", colorPurpleBold, colorReset, colorGray, displayPath(m.path), colorReset)
if !m.scanning {
fmt.Fprintf(&b, " | Total: %s", humanizeBytes(m.totalSize))
}
@@ -962,7 +962,7 @@ func (m model) View() string {
case percent >= 20:
sizeColor = colorYellow
case percent >= 5:
sizeColor = colorCyan
sizeColor = colorBlue
default:
sizeColor = colorGray
}
@@ -1050,7 +1050,7 @@ func (m model) View() string {
} else if percent >= 20 {
sizeColor = colorYellow
} else if percent >= 5 {
sizeColor = colorCyan
sizeColor = colorBlue
} else {
sizeColor = colorGray
}

View File

@@ -10,12 +10,12 @@ import (
)
var (
titleStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#5FD7FF")).Bold(true)
subtleStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#6C6C6C"))
titleStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#C79FD7")).Bold(true)
subtleStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#9E9E9E"))
warnStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#FFD75F"))
dangerStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#FF5F5F")).Bold(true)
dangerStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#FF6B6B")).Bold(true)
okStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#87D787"))
lineStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#4A4A4A"))
lineStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#5A5A5A"))
)
const (
@@ -134,11 +134,11 @@ func renderHeader(m MetricsSnapshot, errMsg string, animFrame int, termWidth int
func getScoreStyle(score int) lipgloss.Style {
if score >= 90 {
// Excellent - Green
return lipgloss.NewStyle().Foreground(lipgloss.Color("#87D787")).Bold(true)
// Excellent - Bright Green
return lipgloss.NewStyle().Foreground(lipgloss.Color("#87FF87")).Bold(true)
} else if score >= 75 {
// Good - Light Green
return lipgloss.NewStyle().Foreground(lipgloss.Color("#AFD787")).Bold(true)
// Good - Green
return lipgloss.NewStyle().Foreground(lipgloss.Color("#87D787")).Bold(true)
} else if score >= 60 {
// Fair - Yellow
return lipgloss.NewStyle().Foreground(lipgloss.Color("#FFD75F")).Bold(true)
@@ -147,7 +147,7 @@ func getScoreStyle(score int) lipgloss.Style {
return lipgloss.NewStyle().Foreground(lipgloss.Color("#FFAF5F")).Bold(true)
} else {
// Critical - Red
return lipgloss.NewStyle().Foreground(lipgloss.Color("#FF5F5F")).Bold(true)
return lipgloss.NewStyle().Foreground(lipgloss.Color("#FF6B6B")).Bold(true)
}
}

View File

@@ -14,8 +14,10 @@ readonly MOLE_COMMON_LOADED=1
readonly ESC=$'\033'
readonly GREEN="${ESC}[0;32m"
readonly BLUE="${ESC}[0;34m"
readonly YELLOW="${ESC}[1;33m"
readonly CYAN="${ESC}[0;36m"
readonly YELLOW="${ESC}[0;33m"
readonly PURPLE="${ESC}[0;35m"
readonly PURPLE_BOLD="${ESC}[1;35m"
readonly RED="${ESC}[0;31m"
readonly GRAY="${ESC}[0;90m"
readonly NC="${ESC}[0m"
@@ -558,7 +560,7 @@ show_menu_option() {
local selected="$3"
if [[ "$selected" == "true" ]]; then
echo -e "${BLUE}${ICON_ARROW} $number. $text${NC}"
echo -e "${CYAN}${ICON_ARROW} $number. $text${NC}"
else
echo " $number. $text"
fi
@@ -1341,7 +1343,7 @@ start_section() {
TRACK_SECTION=1
SECTION_ACTIVITY=0
echo ""
echo -e "${PURPLE}${ICON_ARROW} $1${NC}"
echo -e "${PURPLE_BOLD}${ICON_ARROW} $1${NC}"
}
# End a section (show "Nothing to tidy" if no activity)

View File

@@ -366,7 +366,7 @@ paginated_multi_select() {
[[ ${selected[real]} == true ]] && checkbox="$ICON_SOLID"
if [[ $is_current == true ]]; then
printf "\r\033[2K${BLUE}${ICON_ARROW} %s %s${NC}\n" "$checkbox" "${items[real]}" >&2
printf "\r\033[2K${CYAN}${ICON_ARROW} %s %s${NC}\n" "$checkbox" "${items[real]}" >&2
else
printf "\r\033[2K %s %s\n" "$checkbox" "${items[real]}" >&2
fi
@@ -387,7 +387,7 @@ paginated_multi_select() {
done
# Header only
printf "${clear_line}${PURPLE}%s${NC} ${GRAY}%d/%d selected${NC}\n" "${title}" "$selected_count" "$total_items" >&2
printf "${clear_line}${PURPLE_BOLD}%s${NC} ${GRAY}%d/%d selected${NC}\n" "${title}" "$selected_count" "$total_items" >&2
# Visible slice
local visible_total=${#view_indices[@]}

View File

@@ -137,7 +137,7 @@ paginated_multi_select() {
[[ ${selected[idx]} == true ]] && checkbox="$ICON_SOLID"
if [[ $is_current == true ]]; then
printf "\r\033[2K${BLUE}${ICON_ARROW} %s %s${NC}\n" "$checkbox" "${items[idx]}" >&2
printf "\r\033[2K${CYAN}${ICON_ARROW} %s %s${NC}\n" "$checkbox" "${items[idx]}" >&2
else
printf "\r\033[2K %s %s\n" "$checkbox" "${items[idx]}" >&2
fi
@@ -161,7 +161,7 @@ paginated_multi_select() {
done
# Header
printf "${clear_line}${PURPLE}%s${NC} ${GRAY}%d/%d selected${NC}\n" "${title}" "$selected_count" "$total_items" >&2
printf "${clear_line}${PURPLE_BOLD}%s${NC} ${GRAY}%d/%d selected${NC}\n" "${title}" "$selected_count" "$total_items" >&2
if [[ $total_items -eq 0 ]]; then
printf "${clear_line}${GRAY}No items available${NC}\n" >&2

View File

@@ -156,7 +156,7 @@ batch_uninstall_applications() {
# Display detailed file list for each app before confirmation
echo ""
echo -e "${PURPLE}Files to be removed:${NC}"
echo -e "${PURPLE_BOLD}Files to be removed:${NC}"
echo ""
for detail in "${app_details[@]}"; do
IFS='|' read -r app_name app_path bundle_id total_kb encoded_files encoded_system_files <<< "$detail"

BIN
mole-analyze Executable file

Binary file not shown.