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