mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 12:41:46 +00:00
Merge branch 'main' of github.com:tw93/Mole
This commit is contained in:
@@ -99,11 +99,11 @@ perform_purge() {
|
||||
truncate_path() {
|
||||
local path="$1"
|
||||
local term_cols
|
||||
term_cols=$(tput cols 2>/dev/null || echo 80)
|
||||
term_cols=$(tput cols 2> /dev/null || echo 80)
|
||||
# Reserve some space for the spinner and text (approx 20 chars)
|
||||
local max_len=$((term_cols - 20))
|
||||
# Ensure a reasonable minimum width
|
||||
if (( max_len < 40 )); then
|
||||
if ((max_len < 40)); then
|
||||
max_len=40
|
||||
fi
|
||||
|
||||
|
||||
@@ -62,14 +62,14 @@ func TestColorizeTempThresholds(t *testing.T) {
|
||||
temp float64
|
||||
expected string
|
||||
}{
|
||||
{temp: 30.0, expected: "30.0"}, // Normal - should use okStyle (green)
|
||||
{temp: 55.9, expected: "55.9"}, // Just below warning threshold
|
||||
{temp: 56.0, expected: "56.0"}, // Warning threshold - should use warnStyle (yellow)
|
||||
{temp: 65.0, expected: "65.0"}, // Mid warning range
|
||||
{temp: 75.9, expected: "75.9"}, // Just below danger threshold
|
||||
{temp: 76.0, expected: "76.0"}, // Danger threshold - should use dangerStyle (red)
|
||||
{temp: 90.0, expected: "90.0"}, // High temperature
|
||||
{temp: 0.0, expected: "0.0"}, // Edge case: zero
|
||||
{temp: 30.0, expected: "30.0"}, // Normal - should use okStyle (green)
|
||||
{temp: 55.9, expected: "55.9"}, // Just below warning threshold
|
||||
{temp: 56.0, expected: "56.0"}, // Warning threshold - should use warnStyle (yellow)
|
||||
{temp: 65.0, expected: "65.0"}, // Mid warning range
|
||||
{temp: 75.9, expected: "75.9"}, // Just below danger threshold
|
||||
{temp: 76.0, expected: "76.0"}, // Danger threshold - should use dangerStyle (red)
|
||||
{temp: 90.0, expected: "90.0"}, // High temperature
|
||||
{temp: 0.0, expected: "0.0"}, // Edge case: zero
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
|
||||
@@ -415,8 +415,8 @@ readonly DATA_PROTECTED_BUNDLES=(
|
||||
"com.netease.163music" # NetEase Music
|
||||
|
||||
# Web Browsers (protect complex storage like IndexedDB, localStorage)
|
||||
"Firefox" # Firefox Application Support
|
||||
"org.mozilla.*" # Firefox bundle IDs
|
||||
"Firefox" # Firefox Application Support
|
||||
"org.mozilla.*" # Firefox bundle IDs
|
||||
|
||||
# License Management & App Stores
|
||||
"com.paddle.Paddle*" # Paddle (license management)
|
||||
|
||||
Reference in New Issue
Block a user