mirror of
https://github.com/tw93/Mole.git
synced 2026-02-16 13:31:12 +00:00
Scan Optimization
This commit is contained in:
BIN
bin/analyze-go
BIN
bin/analyze-go
Binary file not shown.
@@ -925,32 +925,6 @@ func (m model) View() string {
|
|||||||
var b strings.Builder
|
var b strings.Builder
|
||||||
fmt.Fprintln(&b)
|
fmt.Fprintln(&b)
|
||||||
|
|
||||||
if m.isOverview && hasPendingOverviewEntries(m.entries) {
|
|
||||||
fmt.Fprintf(&b, "%sAnalyze Disk%s\n", colorPurple, colorReset)
|
|
||||||
fmt.Fprintf(&b, "%sPreparing overview...%s\n\n", colorGray, colorReset)
|
|
||||||
|
|
||||||
filesScanned, dirsScanned, bytesScanned := m.getOverviewScanProgress()
|
|
||||||
|
|
||||||
fmt.Fprintf(&b, "%s%s%s%s Scanning: %s%s files%s, %s%s dirs%s, %s%s%s\n",
|
|
||||||
colorCyan, colorBold,
|
|
||||||
spinnerFrames[m.spinner],
|
|
||||||
colorReset,
|
|
||||||
colorYellow, formatNumber(filesScanned), colorReset,
|
|
||||||
colorYellow, formatNumber(dirsScanned), colorReset,
|
|
||||||
colorGreen, humanizeBytes(bytesScanned), colorReset)
|
|
||||||
|
|
||||||
if m.overviewCurrentPath != nil {
|
|
||||||
currentPath := *m.overviewCurrentPath
|
|
||||||
if currentPath != "" {
|
|
||||||
shortPath := displayPath(currentPath)
|
|
||||||
shortPath = truncateMiddle(shortPath, 60)
|
|
||||||
fmt.Fprintf(&b, "%s%s%s\n", colorGray, shortPath, colorReset)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return b.String()
|
|
||||||
}
|
|
||||||
|
|
||||||
if m.deleteConfirm && m.deleteTarget != nil {
|
if m.deleteConfirm && m.deleteTarget != nil {
|
||||||
// Show delete confirmation prominently at the top
|
// Show delete confirmation prominently at the top
|
||||||
fmt.Fprintf(&b, "%sDelete: %s (%s)? Press Delete again to confirm, ESC to cancel%s\n\n",
|
fmt.Fprintf(&b, "%sDelete: %s (%s)? Press Delete again to confirm, ESC to cancel%s\n\n",
|
||||||
@@ -959,7 +933,12 @@ func (m model) View() string {
|
|||||||
|
|
||||||
if m.isOverview {
|
if m.isOverview {
|
||||||
fmt.Fprintf(&b, "%sAnalyze Disk%s\n", colorPurple, colorReset)
|
fmt.Fprintf(&b, "%sAnalyze Disk%s\n", colorPurple, colorReset)
|
||||||
|
if m.overviewScanning {
|
||||||
|
fmt.Fprintf(&b, "%sSelect a location to explore:%s ", colorGray, colorReset)
|
||||||
|
fmt.Fprintf(&b, "%s%s%s%s Scanning...\n", colorCyan, colorBold, spinnerFrames[m.spinner], colorReset)
|
||||||
|
} else {
|
||||||
fmt.Fprintf(&b, "%sSelect a location to explore:%s\n", colorGray, colorReset)
|
fmt.Fprintf(&b, "%sSelect a location to explore:%s\n", colorGray, colorReset)
|
||||||
|
}
|
||||||
} else {
|
} 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", colorPurple, colorReset, colorGray, displayPath(m.path), colorReset)
|
||||||
if !m.scanning {
|
if !m.scanning {
|
||||||
|
|||||||
2
mole
2
mole
@@ -22,7 +22,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|||||||
source "$SCRIPT_DIR/lib/common.sh"
|
source "$SCRIPT_DIR/lib/common.sh"
|
||||||
|
|
||||||
# Version info
|
# Version info
|
||||||
VERSION="1.9.0"
|
VERSION="1.9.1"
|
||||||
MOLE_TAGLINE="can dig deep to clean your Mac."
|
MOLE_TAGLINE="can dig deep to clean your Mac."
|
||||||
|
|
||||||
# Get latest version from remote repository
|
# Get latest version from remote repository
|
||||||
|
|||||||
Reference in New Issue
Block a user