From b456cad3d544f60c751046305ae2395530aa9d69 Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Sat, 22 Feb 2025 15:56:04 +0800 Subject: [PATCH] feat: enhance accessibility and improve component styles across the application --- .../ClientComponents/detail/NetworkChart.tsx | 16 ++-- .../detail/ServerDetailChartClient.tsx | 64 ++++++++-------- .../detail/ServerDetailClient.tsx | 76 +++++++++---------- .../ClientComponents/detail/ServerIPInfo.tsx | 38 +++++----- app/(main)/ClientComponents/main/Global.tsx | 4 +- .../ClientComponents/main/GlobalInfo.tsx | 2 +- .../ClientComponents/main/InteractiveMap.tsx | 10 +-- .../ClientComponents/main/MapTooltip.tsx | 10 +-- .../main/ServerListClient.tsx | 16 ++-- .../main/ServerOverviewClient.tsx | 64 ++++++++-------- app/(main)/footer.tsx | 6 +- app/(main)/header.tsx | 24 +++--- app/(main)/server/[id]/page.tsx | 4 +- app/not-found.tsx | 6 +- biome.json | 3 + components/AnimatedCount.tsx | 2 +- components/DashCommand.tsx | 4 +- components/LanguageSwitcher.tsx | 4 +- components/ServerCard.tsx | 42 +++++----- components/ServerCardInline.tsx | 52 ++++++------- components/SignIn.tsx | 12 +-- components/Switch.tsx | 10 +-- components/TabSwitch.tsx | 6 +- components/ThemeSwitcher.tsx | 4 +- components/loading/GlobalLoading.tsx | 2 +- components/loading/NetworkChartLoading.tsx | 2 +- components/loading/ServerDetailLoading.tsx | 20 ++--- .../ui/animated-circular-progress-bar.tsx | 8 +- components/ui/animated-tooltip.tsx | 2 +- components/ui/card.tsx | 4 +- components/ui/chart.tsx | 8 +- components/ui/command.tsx | 10 +-- components/ui/dialog.tsx | 10 +-- components/ui/dropdown-menu.tsx | 12 +-- components/ui/input.tsx | 2 +- components/ui/navigation-menu.tsx | 8 +- components/ui/popover.tsx | 2 +- components/ui/sheet.tsx | 8 +- components/ui/tooltip.tsx | 2 +- 39 files changed, 291 insertions(+), 288 deletions(-) diff --git a/app/(main)/ClientComponents/detail/NetworkChart.tsx b/app/(main)/ClientComponents/detail/NetworkChart.tsx index 67f3e84..6fd530b 100644 --- a/app/(main)/ClientComponents/detail/NetworkChart.tsx +++ b/app/(main)/ClientComponents/detail/NetworkChart.tsx @@ -47,8 +47,8 @@ export function NetworkChartClient({ return ( <>
{error.message}
-{t("chart_fetch_error_message")}
+{error.message}
+{t("chart_fetch_error_message")}
{error.message}
-{t("chart_fetch_error_message")}
+{error.message}
+{t("chart_fetch_error_message")}
CPU
+CPU
{cpu.toFixed(0)}%
+{cpu.toFixed(0)}%
{t("Process")}
+{t("Process")}
{process}
+{process}
{t("Mem")}
+{t("Mem")}
{mem.toFixed(0)}%
+{mem.toFixed(0)}%
{t("Swap")}
+{t("Swap")}
{swap.toFixed(0)}%
+{swap.toFixed(0)}%
{t("Disk")}
+{t("Disk")}
{disk.toFixed(0)}%
+{disk.toFixed(0)}%
{t("Upload")}
+{t("Upload")}
{up.toFixed(2)} M/s
+ +{up.toFixed(2)} M/s
{t("Download")}
+{t("Download")}
{down.toFixed(2)} M/s
+ +{down.toFixed(2)} M/s
TCP
+TCP
{tcp}
+ +{tcp}
UDP
+UDP
{udp}
+ +{udp}
{error.message}
-{t("detail_fetch_error_message")}
+{error.message}
+{t("detail_fetch_error_message")}
{t("status")}
+{t("status")}
{t("Uptime")}
+{t("Uptime")}
{t("Version")}
+{t("Version")}
{t("Arch")}
+{t("Arch")}
{t("Mem")}
+{t("Mem")}
{t("Disk")}
+{t("Disk")}
{t("Region")}
+{t("Region")}
{t("System")}
+{t("System")}
{t("CPU")}
+{t("CPU")}
{"GPU"}
+{"GPU"}
{t("Load")}
+{t("Load")}
{t("Upload")}
+{t("Upload")}
{net_out_transfer ? ({t("Download")}
+{t("Download")}
{net_in_transfer ? ({t("LastActive")}
+{t("LastActive")}
{"ASN"}
+{"ASN"}
{t("asn_number")}
+{t("asn_number")}
{t("registered_country")}
+{t("registered_country")}
{"ISO"}
+{"ISO"}
{t("city")}
+{t("city")}
{t("longitude")}
+{t("longitude")}
{t("latitude")}
+{t("latitude")}
{t("time_zone")}
+{t("time_zone")}
{t("postal_code")}
+{t("postal_code")}
{error.message}
+{error.message}
+
{t("Distributions")} {countries.length} {t("Regions")}