diff --git a/AppImage/components/storage-overview.tsx b/AppImage/components/storage-overview.tsx index 4580ccdf..ded56c34 100644 --- a/AppImage/components/storage-overview.tsx +++ b/AppImage/components/storage-overview.tsx @@ -1421,42 +1421,65 @@ export function StorageOverview() { const availableSpare = (nvmeHealth?.avail_spare ?? nvmeHealth?.available_spare) as number | undefined - if (wearPercent !== null || dataWrittenLabel) { + // Wear used % (inverse of life remaining) + const wearUsed = wearPercent !== null ? 100 - wearPercent : null + // Life ring color: green ≥50%, yellow 20-49%, red <20% + const lifeColor = wearPercent !== null + ? (wearPercent >= 50 ? '#22c55e' : wearPercent >= 20 ? '#eab308' : '#ef4444') + : '#6b7280' + + if (wearUsed !== null || dataWrittenLabel) { return ( - <> +
+ {/* Life remaining ring */} {wearPercent !== null && ( -
-
-

Life Remaining

-

{wearPercent}%

-
- div]:bg-red-500' : '[&>div]:bg-blue-500'}`} - /> +
+ + + + {wearPercent}% + life +
)} -
- {estimatedLife && ( + {/* Wear bar + stats */} +
+ {wearUsed !== null && (
-

Estimated Life Remaining

-

{estimatedLife}

-
- )} - {dataWrittenLabel && ( -
-

Total Data Written

-

{dataWrittenLabel}

-
- )} - {availableSpare !== undefined && ( -
-

Available Spare

-

{availableSpare}%

+
+

Wear

+

{wearUsed}%

+
+
)} +
+ {estimatedLife && ( +
+

Est. Life

+

{estimatedLife}

+
+ )} + {dataWrittenLabel && ( +
+

Data Written

+

{dataWrittenLabel}

+
+ )} + {availableSpare !== undefined && ( +
+

Avail. Spare

+

{availableSpare}%

+
+ )} +
- +
) } return null