feat: add boot time display in ServerDetailOverview and localization … (#35)

* feat: add boot time display in ServerDetailOverview and localization support

* chore: auto-fix linting and formatting issues
This commit is contained in:
仓鼠
2025-03-12 09:25:42 +08:00
committed by GitHub
parent 1a38ce8c77
commit 7ffef91d2d
5 changed files with 16 additions and 3 deletions

View File

@@ -74,6 +74,7 @@ export default function ServerDetailOverview({ server_id }: { server_id: string
net_out_transfer,
net_in_transfer,
last_active_time_string,
boot_time_string,
} = formatNezhaInfo(nezhaWsData.now, server)
const customBackgroundImage = (window.CustomBackgroundImage as string) !== "" ? window.CustomBackgroundImage : undefined
@@ -285,6 +286,14 @@ export default function ServerDetailOverview({ server_id }: { server_id: string
</section>
<section className="flex flex-wrap gap-2 mt-1">
<Card className="rounded-[10px] bg-transparent border-none shadow-none">
<CardContent className="px-1.5 py-1">
<section className="flex flex-col items-start gap-0.5">
<p className="text-xs text-muted-foreground">{t("serverDetail.bootTime")}</p>
<div className="text-xs">{boot_time_string ? boot_time_string : "N/A"}</div>
</section>
</CardContent>
</Card>
<Card className="rounded-[10px] bg-transparent border-none shadow-none">
<CardContent className="px-1.5 py-1">
<section className="flex flex-col items-start gap-0.5">