From 97d374920b71bdb3636dfd035e88c0586dee3fdd Mon Sep 17 00:00:00 2001 From: Leo dev Date: Sat, 27 Dec 2025 22:20:51 +0100 Subject: [PATCH] Fixed memory, and updated color scheme --- src/app/api/status/route.ts | 4 +- src/app/globals.css | 242 +++++++++++++++++++++++------------- src/app/monitoring/page.tsx | 16 +-- 3 files changed, 166 insertions(+), 96 deletions(-) diff --git a/src/app/api/status/route.ts b/src/app/api/status/route.ts index cc10a22..4a0ace8 100644 --- a/src/app/api/status/route.ts +++ b/src/app/api/status/route.ts @@ -26,6 +26,8 @@ export async function GET(req: NextRequest): Promise { const root = disks.find((d) => d.mount === "/" || d.fs.includes("disk3")); + console.log(mem.available, mem.total); + return NextResponse.json({ message: "ok", liveData: { @@ -39,7 +41,7 @@ export async function GET(req: NextRequest): Promise { total: mem.total, used: mem.used, free: mem.free, - usage: ((mem.total - mem.free) / mem.total) * 100, + usage: ((mem.total - mem.available) / mem.total) * 100, }, disk: { used: (root?.size || 0) - (root?.available || 0), diff --git a/src/app/globals.css b/src/app/globals.css index 0402e06..35672be 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -45,96 +45,164 @@ } :root { - --background: oklch(0.97 0.02 225.66); - --foreground: oklch(0.15 0.02 269.18); - --card: oklch(0.98 0.01 228.79); - --card-foreground: oklch(0.15 0.02 269.18); - --popover: oklch(0.98 0.01 238.45); - --popover-foreground: oklch(0.15 0.02 269.18); - --primary: oklch(0.71 0.15 239.15); - --primary-foreground: oklch(0.94 0.03 232.39); - --secondary: oklch(0.91 0.03 229.20); - --secondary-foreground: oklch(0.15 0.02 269.18); - --muted: oklch(0.89 0.02 225.69); - --muted-foreground: oklch(0.36 0.03 231.55); - --accent: oklch(0.88 0.02 235.72); - --accent-foreground: oklch(0.34 0.05 229.20); - --destructive: oklch(0.61 0.24 20.96); - --border: oklch(0.82 0.02 240.77); - --input: oklch(0.82 0.02 240.77); - --ring: oklch(0.55 0.10 235.72); - --chart-1: oklch(0.57 0.11 228.92); - --chart-2: oklch(0.45 0.10 270.08); - --chart-3: oklch(0.65 0.15 159.03); - --chart-4: oklch(0.75 0.10 100.01); - --chart-5: oklch(0.55 0.15 299.88); - --sidebar: oklch(0.93 0.01 238.46); - --sidebar-foreground: oklch(0.15 0.02 269.18); - --sidebar-primary: oklch(0.57 0.11 228.92); - --sidebar-primary-foreground: oklch(0.99 0.01 203.97); - --sidebar-accent: oklch(0.88 0.02 235.72); - --sidebar-accent-foreground: oklch(0.15 0.02 269.18); - --sidebar-border: oklch(0.82 0.02 240.77); - --sidebar-ring: oklch(0.57 0.11 228.92); - - --font-sans: 'Source Code Pro', 'Geist', 'Geist Fallback', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; - --font-serif: 'Source Serif 4', 'Geist', 'Geist Fallback', ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif; - --font-mono: 'Source Code Pro', 'Geist Mono', 'Geist Mono Fallback', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace; - - --radius: 0rem; - - --shadow-2xs: 0px 1px 2.5px 0px oklch(0.49 0.09 235.00 / 0.03); - --shadow-xs: 0px 1px 2.5px 0px oklch(0.49 0.09 235.00 / 0.03); - --shadow-sm: 0px 1px 2.5px 0px oklch(0.49 0.09 235.00 / 0.06), 0px 1px 2px -1px oklch(0.49 0.09 235.00 / 0.06); - --shadow: 0px 1px 2.5px 0px oklch(0.49 0.09 235.00 / 0.06), 0px 1px 2px -1px oklch(0.49 0.09 235.00 / 0.06); - --shadow-md: 0px 1px 2.5px 0px oklch(0.49 0.09 235.00 / 0.06), 0px 2px 4px -1px oklch(0.49 0.09 235.00 / 0.06); - --shadow-lg: 0px 1px 2.5px 0px oklch(0.49 0.09 235.00 / 0.06), 0px 4px 6px -1px oklch(0.49 0.09 235.00 / 0.06); - --shadow-xl: 0px 1px 2.5px 0px oklch(0.49 0.09 235.00 / 0.06), 0px 8px 10px -1px oklch(0.49 0.09 235.00 / 0.06); - --shadow-2xl: 0px 1px 2.5px 0px oklch(0.49 0.09 235.00 / 0.15); - + --background: oklch(0.9842 0.0010 264.5478); + --foreground: oklch(0.2115 0.0072 264.4099); + --card: oklch(1.0000 0 0); + --card-foreground: oklch(0.2115 0.0072 264.4099); + --popover: oklch(1.0000 0 0); + --popover-foreground: oklch(0.2115 0.0072 264.4099); + --primary: oklch(0.5096 0.1483 253.4619); + --primary-foreground: oklch(1.0000 0 0); + --secondary: oklch(0.9210 0.0088 247.9219); + --secondary-foreground: oklch(0.4114 0.0323 248.6180); + --muted: oklch(0.9607 0.0044 247.8691); + --muted-foreground: oklch(0.5921 0.0247 248.2437); + --accent: oklch(0.9607 0.0044 247.8691); + --accent-foreground: oklch(0.4144 0.0162 248.2179); + --destructive: oklch(0.5875 0.2303 28.2622); + --destructive-foreground: oklch(1.0000 0 0); + --border: oklch(0.9050 0.0107 247.9443); + --input: oklch(0.9210 0.0088 247.9219); + --ring: oklch(0.5096 0.1483 253.4619); + --chart-1: oklch(0.5096 0.1483 253.4619); + --chart-2: oklch(0.6610 0.1560 154.8128); + --chart-3: oklch(0.7139 0.1737 55.1486); + --chart-4: oklch(0.5103 0.2201 301.6038); + --chart-5: oklch(0.5875 0.2303 28.2622); + --sidebar: oklch(0.9605 0.0024 264.5432); + --sidebar-foreground: oklch(0.2639 0.0102 264.3844); + --sidebar-primary: oklch(0.5546 0.1629 253.5932); + --sidebar-primary-foreground: oklch(1.0000 0 0); + --sidebar-accent: oklch(0.9210 0.0088 247.9219); + --sidebar-accent-foreground: oklch(0.4144 0.0162 248.2179); + --sidebar-border: oklch(0.8809 0.0134 247.9797); + --sidebar-ring: oklch(0.5096 0.1483 253.4619); + --font-sans: 'Inter', sans-serif; + --font-serif: 'Lora', serif; + --font-mono: 'Fira Code', monospace; + --radius: 0.5rem; + --shadow-x: 0rem; + --shadow-y: 0.25rem; + --shadow-blur: 0.5rem; + --shadow-spread: 0rem; + --shadow-opacity: 0.1; + --shadow-color: 0 0 0; + --shadow-2xs: 0rem 0.25rem 0.5rem 0rem hsl(0 0 0 / 0.05); + --shadow-xs: 0rem 0.25rem 0.5rem 0rem hsl(0 0 0 / 0.05); + --shadow-sm: 0rem 0.25rem 0.5rem 0rem hsl(0 0 0 / 0.10), 0rem 1px 2px -1px hsl(0 0 0 / 0.10); + --shadow: 0rem 0.25rem 0.5rem 0rem hsl(0 0 0 / 0.10), 0rem 1px 2px -1px hsl(0 0 0 / 0.10); + --shadow-md: 0rem 0.25rem 0.5rem 0rem hsl(0 0 0 / 0.10), 0rem 2px 4px -1px hsl(0 0 0 / 0.10); + --shadow-lg: 0rem 0.25rem 0.5rem 0rem hsl(0 0 0 / 0.10), 0rem 4px 6px -1px hsl(0 0 0 / 0.10); + --shadow-xl: 0rem 0.25rem 0.5rem 0rem hsl(0 0 0 / 0.10), 0rem 8px 10px -1px hsl(0 0 0 / 0.10); + --shadow-2xl: 0rem 0.25rem 0.5rem 0rem hsl(0 0 0 / 0.25); + --tracking-normal: 0em; + --spacing: 0.25rem; } .dark { - --background: oklch(0.18 0.02 271.27); - --foreground: oklch(0.90 0.01 238.47); - --card: oklch(0.22 0.02 271.67); - --card-foreground: oklch(0.90 0.01 238.47); - --popover: oklch(0.22 0.02 271.67); - --popover-foreground: oklch(0.90 0.01 238.47); - --primary: oklch(52.5% 0.105 236); - --primary-foreground: oklch(95.1% 0.00932 232.789); - --secondary: oklch(0.28 0.03 270.91); - --secondary-foreground: oklch(0.90 0.01 238.47); - --muted: oklch(0.28 0.03 270.91); - --muted-foreground: oklch(0.60 0.03 269.46); - --accent: oklch(0.28 0.03 270.91); - --accent-foreground: oklch(0.90 0.01 238.47); - --destructive: oklch(0.64 0.25 19.69); - --border: oklch(0.90 0.01 238.47 / 15%); - --input: oklch(0.90 0.01 238.47 / 20%); - --ring: oklch(0.66 0.13 227.70); - --chart-1: oklch(0.66 0.13 227.70); - --chart-2: oklch(0.60 0.10 269.83); - --chart-3: oklch(0.70 0.15 159.83); - --chart-4: oklch(0.80 0.10 100.65); - --chart-5: oklch(0.60 0.15 300.14); - --sidebar: oklch(0.22 0.02 271.67); - --sidebar-foreground: oklch(0.90 0.01 238.47); - --sidebar-primary: oklch(0.66 0.13 227.70); - --sidebar-primary-foreground: oklch(0.18 0.02 271.27); - --sidebar-accent: oklch(0.28 0.03 270.91); - --sidebar-accent-foreground: oklch(0.90 0.01 238.47); - --sidebar-border: oklch(0.90 0.01 238.47 / 15%); - --sidebar-ring: oklch(0.66 0.13 227.70); - - --shadow-2xs: 0px 1px 2px 0px oklch(0 0 0 / 0.01); - --shadow-xs: 0px 1px 2px 0px oklch(0 0 0 / 0.01); - --shadow-sm: 0px 1px 2px 0px oklch(0 0 0 / 0.01), 0px 1px 2px -1px oklch(0 0 0 / 0.01); - --shadow: 0px 1px 2px 0px oklch(0 0 0 / 0.01), 0px 1px 2px -1px oklch(0 0 0 / 0.01); - --shadow-md: 0px 1px 2px 0px oklch(0 0 0 / 0.01), 0px 2px 4px -1px oklch(0 0 0 / 0.01); - --shadow-lg: 0px 1px 2px 0px oklch(0 0 0 / 0.01), 0px 4px 6px -1px oklch(0 0 0 / 0.01); - --shadow-xl: 0px 1px 2px 0px oklch(0 0 0 / 0.01), 0px 8px 10px -1px oklch(0 0 0 / 0.01); - --shadow-2xl: 0px 1px 2px 0px oklch(0 0 0 / 0.03); + --background: oklch(0.1984 0.0154 256.8228); + --foreground: oklch(0.8809 0.0134 247.9797); + --card: oklch(0.2292 0.0222 256.8398); + --card-foreground: oklch(0.8809 0.0134 247.9797); + --popover: oklch(0.2292 0.0222 256.8398); + --popover-foreground: oklch(0.8809 0.0134 247.9797); + --primary: oklch(0.5096 0.1483 253.4619); + --primary-foreground: oklch(0.9843 0.0017 247.8393); + --secondary: oklch(0.3095 0.0306 256.8416); + --secondary-foreground: oklch(0.8809 0.0134 247.9797); + --muted: oklch(0.2605 0.0240 256.8358); + --muted-foreground: oklch(0.6780 0.0191 248.1098); + --accent: oklch(0.2605 0.0240 256.8358); + --accent-foreground: oklch(0.8809 0.0134 247.9797); + --destructive: oklch(0.5875 0.2303 28.2622); + --destructive-foreground: oklch(0.9843 0.0017 247.8393); + --border: oklch(0.3567 0.0369 256.8455); + --input: oklch(0.3095 0.0306 256.8416); + --ring: oklch(0.5096 0.1483 253.4619); + --chart-1: oklch(0.5096 0.1483 253.4619); + --chart-2: oklch(0.6610 0.1560 154.8128); + --chart-3: oklch(0.7139 0.1737 55.1486); + --chart-4: oklch(0.5103 0.2201 301.6038); + --chart-5: oklch(0.5875 0.2303 28.2622); + --sidebar: oklch(0.2292 0.0222 256.8398); + --sidebar-foreground: oklch(0.9210 0.0088 247.9219); + --sidebar-primary: oklch(0.5096 0.1483 253.4619); + --sidebar-primary-foreground: oklch(0.9843 0.0017 247.8393); + --sidebar-accent: oklch(0.2605 0.0240 256.8358); + --sidebar-accent-foreground: oklch(0.8809 0.0134 247.9797); + --sidebar-border: oklch(0.3567 0.0369 256.8455); + --sidebar-ring: oklch(0.5096 0.1483 253.4619); + --font-sans: 'Roboto Mono', monospace; + --font-serif: 'Roboto Slab', serif; + --font-mono: 'Fira Code', monospace; + --radius: 0.25rem; + --shadow-x: 0rem; + --shadow-y: 0.5rem; + --shadow-blur: 0.75rem; + --shadow-spread: 0rem; + --shadow-opacity: 0.3; + --shadow-color: 0 0 0; + --shadow-2xs: 0rem 0.5rem 0.75rem 0rem hsl(0 0 0 / 0.15); + --shadow-xs: 0rem 0.5rem 0.75rem 0rem hsl(0 0 0 / 0.15); + --shadow-sm: 0rem 0.5rem 0.75rem 0rem hsl(0 0 0 / 0.30), 0rem 1px 2px -1px hsl(0 0 0 / 0.30); + --shadow: 0rem 0.5rem 0.75rem 0rem hsl(0 0 0 / 0.30), 0rem 1px 2px -1px hsl(0 0 0 / 0.30); + --shadow-md: 0rem 0.5rem 0.75rem 0rem hsl(0 0 0 / 0.30), 0rem 2px 4px -1px hsl(0 0 0 / 0.30); + --shadow-lg: 0rem 0.5rem 0.75rem 0rem hsl(0 0 0 / 0.30), 0rem 4px 6px -1px hsl(0 0 0 / 0.30); + --shadow-xl: 0rem 0.5rem 0.75rem 0rem hsl(0 0 0 / 0.30), 0rem 8px 10px -1px hsl(0 0 0 / 0.30); + --shadow-2xl: 0rem 0.5rem 0.75rem 0rem hsl(0 0 0 / 0.75); +} + +@theme inline { + --color-background: var(--background); + --color-foreground: var(--foreground); + --color-card: var(--card); + --color-card-foreground: var(--card-foreground); + --color-popover: var(--popover); + --color-popover-foreground: var(--popover-foreground); + --color-primary: var(--primary); + --color-primary-foreground: var(--primary-foreground); + --color-secondary: var(--secondary); + --color-secondary-foreground: var(--secondary-foreground); + --color-muted: var(--muted); + --color-muted-foreground: var(--muted-foreground); + --color-accent: var(--accent); + --color-accent-foreground: var(--accent-foreground); + --color-destructive: var(--destructive); + --color-destructive-foreground: var(--destructive-foreground); + --color-border: var(--border); + --color-input: var(--input); + --color-ring: var(--ring); + --color-chart-1: var(--chart-1); + --color-chart-2: var(--chart-2); + --color-chart-3: var(--chart-3); + --color-chart-4: var(--chart-4); + --color-chart-5: var(--chart-5); + --color-sidebar: var(--sidebar); + --color-sidebar-foreground: var(--sidebar-foreground); + --color-sidebar-primary: var(--sidebar-primary); + --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); + --color-sidebar-accent: var(--sidebar-accent); + --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); + --color-sidebar-border: var(--sidebar-border); + --color-sidebar-ring: var(--sidebar-ring); + + --font-sans: var(--font-sans); + --font-mono: var(--font-mono); + --font-serif: var(--font-serif); + + --radius-sm: calc(var(--radius) - 4px); + --radius-md: calc(var(--radius) - 2px); + --radius-lg: var(--radius); + --radius-xl: calc(var(--radius) + 4px); + + --shadow-2xs: var(--shadow-2xs); + --shadow-xs: var(--shadow-xs); + --shadow-sm: var(--shadow-sm); + --shadow: var(--shadow); + --shadow-md: var(--shadow-md); + --shadow-lg: var(--shadow-lg); + --shadow-xl: var(--shadow-xl); + --shadow-2xl: var(--shadow-2xl); } @theme inline { diff --git a/src/app/monitoring/page.tsx b/src/app/monitoring/page.tsx index bb18e13..ff5903c 100644 --- a/src/app/monitoring/page.tsx +++ b/src/app/monitoring/page.tsx @@ -146,12 +146,12 @@ export default function MonitoringPage() { > @@ -179,7 +179,7 @@ export default function MonitoringPage() { @@ -209,12 +209,12 @@ export default function MonitoringPage() { > @@ -242,7 +242,7 @@ export default function MonitoringPage() { @@ -286,7 +286,7 @@ export default function MonitoringPage() {