From cfa4f4745c74e113b84c1769de30f699ab71dca7 Mon Sep 17 00:00:00 2001 From: xiaozhou233 Date: Tue, 11 Aug 2026 01:51:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=AE=80=E5=8C=96=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E5=8D=A1=E7=89=87=EF=BC=8C=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E5=9E=8B=E5=8F=B7=E3=80=81=E5=A4=A7=E5=B0=8F=E5=8F=8A=E6=A0=B8?= =?UTF-8?q?=E5=BF=83=E6=95=B0=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dashboard/src/pages/Home.tsx | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/dashboard/src/pages/Home.tsx b/dashboard/src/pages/Home.tsx index c3be64a..ee1399b 100644 --- a/dashboard/src/pages/Home.tsx +++ b/dashboard/src/pages/Home.tsx @@ -39,14 +39,6 @@ function formatUptime(seconds: number) { return `${m} 分钟` } -function formatBytes(bytes: number) { - if (!bytes || bytes <= 0) return '0 B' - const units = ['B', 'KB', 'MB', 'GB', 'TB'] - const i = Math.min(units.length - 1, Math.floor(Math.log(bytes) / Math.log(1024))) - const value = bytes / 1024 ** i - return `${value >= 10 ? Math.round(value) : value.toFixed(1)} ${units[i]}` -} - function UsageBar({ percent }: { percent: number }) { return (
@@ -180,9 +172,6 @@ export default function Home() { {stats.cpu.usagePercent}% -

- {stats.cpu.model || '未知型号'} · {stats.cpu.cores} 核 -

-

- {formatBytes(stats.memory.used)} / {formatBytes(stats.memory.total)} -