mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-02-04 20:50:08 +00:00
feat: detail overview i18n
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { Card, CardContent } from "@/components/ui/card";
|
||||
import { cn, formatBytes } from "@/lib/utils";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
type ServerOverviewProps = {
|
||||
online: number;
|
||||
@@ -16,6 +17,8 @@ export default function ServerOverview({
|
||||
up,
|
||||
down,
|
||||
}: ServerOverviewProps) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<>
|
||||
<section className="grid grid-cols-2 gap-4 lg:grid-cols-4">
|
||||
@@ -23,7 +26,7 @@ export default function ServerOverview({
|
||||
<CardContent className="px-6 py-3">
|
||||
<section className="flex flex-col gap-1">
|
||||
<p className="text-sm font-medium md:text-base">
|
||||
{"Total servers"}
|
||||
{t("serverOverview.totalServers")}
|
||||
</p>
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="relative flex h-2 w-2">
|
||||
@@ -42,7 +45,7 @@ export default function ServerOverview({
|
||||
<CardContent className="px-6 py-3">
|
||||
<section className="flex flex-col gap-1">
|
||||
<p className="text-sm font-medium md:text-base">
|
||||
{"Online servers"}
|
||||
{t("serverOverview.onlineServers")}
|
||||
</p>
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="relative flex h-2 w-2">
|
||||
@@ -63,7 +66,7 @@ export default function ServerOverview({
|
||||
<CardContent className="px-6 py-3">
|
||||
<section className="flex flex-col gap-1">
|
||||
<p className="text-sm font-medium md:text-base">
|
||||
{"Offline servers"}
|
||||
{t("serverOverview.offlineServers")}
|
||||
</p>
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="relative flex h-2 w-2">
|
||||
@@ -83,7 +86,7 @@ export default function ServerOverview({
|
||||
<CardContent className="relative px-6 py-3">
|
||||
<section className="flex flex-col gap-1">
|
||||
<p className="text-sm font-medium md:text-base">
|
||||
{"Total bandwidth"}
|
||||
{t("serverOverview.totalBandwidth")}
|
||||
</p>
|
||||
|
||||
<section className="flex flex-col sm:flex-row pt-[8px] sm:items-center items-start gap-1">
|
||||
|
||||
Reference in New Issue
Block a user