diff --git a/src/components/ServerDetailOverview.tsx b/src/components/ServerDetailOverview.tsx index 23a6ae9..1f8b560 100644 --- a/src/components/ServerDetailOverview.tsx +++ b/src/components/ServerDetailOverview.tsx @@ -221,22 +221,24 @@ export default function ServerDetailOverview({ - {server?.state.temperatures && server?.state.temperatures.length > 0 && ( - - -
-

{"温度"}

-
- {server?.state.temperatures.map((item,index) => ( -
-

{item.Name}

: {item.Temperature.toFixed(2)} °C -
- ))} -
-
-
-
- )} + {server?.state.temperatures && + server?.state.temperatures.length > 0 && ( + + +
+

{"温度"}

+
+ {server?.state.temperatures.map((item, index) => ( +
+

{item.Name}

:{" "} + {item.Temperature.toFixed(2)} °C +
+ ))} +
+
+
+
+ )}
diff --git a/src/components/ServerOverview.tsx b/src/components/ServerOverview.tsx index 9260e25..f6cc348 100644 --- a/src/components/ServerOverview.tsx +++ b/src/components/ServerOverview.tsx @@ -2,7 +2,10 @@ import { Card, CardContent } from "@/components/ui/card"; import { cn } from "@/lib/utils"; import { useTranslation } from "react-i18next"; import { formatBytes } from "@/lib/format"; -import { Separator } from "./ui/separator"; +import { + ArrowDownCircleIcon, + ArrowUpCircleIcon, +} from "@heroicons/react/20/solid"; type ServerOverviewProps = { online: number; @@ -90,33 +93,30 @@ export default function ServerOverview({ )} > -
-
-

- {t("serverOverview.totalBandwidth")} -

- +
+

- {t("serverOverview.speed")} + {t("serverOverview.network")}

+
+

+ ↑{formatBytes(up)} +

+

+ ↓{formatBytes(down)} +

+
-
-

- ↑{formatBytes(up)} -

-

- ↓{formatBytes(down)} -

-
-
-

- ↑{formatBytes(upSpeed)}/s +

+

+ + {formatBytes( + upSpeed, + )}/s

-

- ↓{formatBytes(downSpeed)}/s +

+ ↓ + {formatBytes(downSpeed)}/s

diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index b18370e..bf2f7d2 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -15,7 +15,8 @@ "onlineServers": "Online Servers", "offlineServers": "Offline Servers", "totalBandwidth": "Total Bandwidth", - "speed": "Speed" + "speed": "Speed", + "network": "Network" }, "serverCard": { "mem": "MEM", diff --git a/src/locales/zh-CN/translation.json b/src/locales/zh-CN/translation.json index 76a29b7..882fc1f 100644 --- a/src/locales/zh-CN/translation.json +++ b/src/locales/zh-CN/translation.json @@ -15,7 +15,8 @@ "onlineServers": "在线服务器", "offlineServers": "离线服务器", "totalBandwidth": "总流量", - "speed": "速率" + "speed": "速率", + "network": "网络" }, "serverCard": { "mem": "内存", diff --git a/src/locales/zh-TW/translation.json b/src/locales/zh-TW/translation.json index 9759d1f..b39ad94 100644 --- a/src/locales/zh-TW/translation.json +++ b/src/locales/zh-TW/translation.json @@ -15,7 +15,8 @@ "onlineServers": "線上服務器", "offlineServers": "離線服務器", "totalBandwidth": "總帶寬", - "speed": "速率" + "speed": "速率", + "network": "網路" }, "serverCard": { "mem": "內存", diff --git a/vite.config.ts b/vite.config.ts index 4107898..167dd12 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -62,7 +62,7 @@ export default defineConfig({ server: { proxy: { "/api/v1/ws/server": { - target: "ws://localhost:8080", + target: "ws://localhost:8008", changeOrigin: true, ws: true, },