diff --git a/app/(main)/ClientComponents/ServerOverviewClient.tsx b/app/(main)/ClientComponents/ServerOverviewClient.tsx index 8b2319d..cacfa4b 100644 --- a/app/(main)/ClientComponents/ServerOverviewClient.tsx +++ b/app/(main)/ClientComponents/ServerOverviewClient.tsx @@ -3,12 +3,15 @@ import { ServerApi } from "@/app/types/nezha-api"; import { Loader } from "@/components/loading/Loader"; import { Card, CardContent } from "@/components/ui/card"; -import { Separator } from "@/components/ui/separator"; import getEnv from "@/lib/env-entry"; import { useFilter } from "@/lib/network-filter-context"; import { useStatus } from "@/lib/status-context"; import { cn, formatBytes, nezhaFetcher } from "@/lib/utils"; import blogMan from "@/public/blog-man.webp"; +import { + ArrowDownCircleIcon, + ArrowUpCircleIcon, +} from "@heroicons/react/20/solid"; import { useTranslations } from "next-intl"; import Image from "next/image"; import { useSearchParams } from "next/navigation"; @@ -49,12 +52,9 @@ export default function ServerOverviewClient() { setStatus("all"); } }} - className={cn( - "cursor-pointer hover:border-blue-500 transition-all min-h-[94px]", - { - "pointer-events-none": global, - }, - )} + className={cn("cursor-pointer hover:border-blue-500 transition-all", { + "pointer-events-none": global, + })} >
@@ -86,7 +86,7 @@ export default function ServerOverviewClient() { } }} className={cn( - "cursor-pointer hover:ring-green-500 ring-1 ring-transparent transition-all min-h-[94px]", + "cursor-pointer hover:ring-green-500 ring-1 ring-transparent transition-all", { "ring-green-500 ring-2 border-transparent": status === "online", }, @@ -126,7 +126,7 @@ export default function ServerOverviewClient() { } }} className={cn( - "cursor-pointer hover:ring-red-500 ring-1 ring-transparent transition-all min-h-[94px]", + "cursor-pointer hover:ring-red-500 ring-1 ring-transparent transition-all", { "ring-red-500 ring-2 border-transparent": status === "offline", }, @@ -166,7 +166,7 @@ export default function ServerOverviewClient() { } }} className={cn( - "cursor-pointer hover:ring-purple-500 ring-1 ring-transparent transition-all min-h-[94px]", + "cursor-pointer hover:ring-purple-500 ring-1 ring-transparent transition-all", { "ring-purple-500 ring-2 border-transparent": filter === true, }, @@ -176,35 +176,37 @@ export default function ServerOverviewClient() { )} > -
-
+
+

- {t("p_3463-3530_Totalbandwidth")} + {t("network")}

- -

{t("speed")}

+
+

+ ↑{formatBytes(data?.total_out_bandwidth || 0)} +

+

+ ↓{formatBytes(data?.total_in_bandwidth || 0)} +

+
{data?.result ? ( <> -
-

- ↑{formatBytes(data?.total_out_bandwidth)} +

+

+ + {formatBytes(data?.total_out_speed)}/s

-

- ↓{formatBytes(data?.total_in_bandwidth)} -

-
-
-

- ↑{formatBytes(data?.total_out_speed)}/s -

-

- ↓{formatBytes(data?.total_in_speed)}/s +

+ + {formatBytes( + data?.total_in_speed, + )}/s

) : ( -
+
)} diff --git a/messages/en.json b/messages/en.json index 982cf33..0825d9e 100644 --- a/messages/en.json +++ b/messages/en.json @@ -5,6 +5,7 @@ "p_2532-2599_Offlineservers": "Offline servers", "p_3463-3530_Totalbandwidth": "Total bandwidth", "speed": "speed", + "network": "Network", "error_message": "Please check your environment variables and review the server console", "no_data_message": "No data" }, diff --git a/messages/ja.json b/messages/ja.json index c62261d..998ca8b 100644 --- a/messages/ja.json +++ b/messages/ja.json @@ -5,6 +5,7 @@ "p_2532-2599_Offlineservers": "オフラインサーバー", "p_3463-3530_Totalbandwidth": "総流量", "speed": "速度", + "network": "ネットワーク", "error_message": "環境変数を確認し、サーバーコンソールを確認してください", "no_data_message": "データなし" }, diff --git a/messages/zh-t.json b/messages/zh-t.json index 0c99add..49dca34 100644 --- a/messages/zh-t.json +++ b/messages/zh-t.json @@ -5,6 +5,7 @@ "p_2532-2599_Offlineservers": "離線伺服器", "p_3463-3530_Totalbandwidth": "總流量", "speed": "速率", + "network": "網路", "error_message": "請檢查您的環境變數並檢查伺服器控制台", "no_data_message": "無資料" }, diff --git a/messages/zh.json b/messages/zh.json index 0668669..aa1ce1d 100644 --- a/messages/zh.json +++ b/messages/zh.json @@ -5,6 +5,7 @@ "p_2532-2599_Offlineservers": "离线服务器", "p_3463-3530_Totalbandwidth": "总流量", "speed": "速率", + "network": "网络", "error_message": "请检查您的环境变量并检查服务器控制台", "no_data_message": "无数据" },