1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-12 13:26:18 +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

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
}