Initial ui

This commit is contained in:
Jack Mechem 2026-03-25 23:33:09 -07:00
parent 526822335e
commit 4bfb87448f
18 changed files with 702 additions and 92 deletions

15
app/lib/utils.ts Normal file
View file

@ -0,0 +1,15 @@
export function formatBytes(bytes: number): string {
if (bytes > 1e9) return (bytes / 1e9).toFixed(1) + " GB";
if (bytes > 1e6) return (bytes / 1e6).toFixed(1) + " MB";
return (bytes / 1e3).toFixed(1) + " KB";
}
export function statColor(percent: number): string {
if (percent > 80) return "#ef4444";
if (percent > 60) return "#f59e0b";
return "#3b82f6";
}
export function pad(n: number): string {
return String(n).padStart(2, "0");
}