feat(detail): add gpu info

This commit is contained in:
hamster1963 2024-12-02 14:14:33 +08:00
parent 14abc76fbc
commit b4e68180ef
2 changed files with 14 additions and 2 deletions

View File

@ -191,7 +191,19 @@ export default function ServerDetailClient({
<section className="flex flex-col items-start gap-0.5"> <section className="flex flex-col items-start gap-0.5">
<p className="text-xs text-muted-foreground">{t("CPU")}</p> <p className="text-xs text-muted-foreground">{t("CPU")}</p>
{data?.host.CPU ? ( {data?.host.CPU ? (
<div className="text-xs"> {data?.host.CPU}</div> <div className="text-xs"> {data?.host.CPU.join(", ")}</div>
) : (
<div className="text-xs">Unknown</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">
<p className="text-xs text-muted-foreground">{"GPU"}</p>
{data?.host.GPU ? (
<div className="text-xs"> {data?.host.GPU.join(", ")}</div>
) : ( ) : (
<div className="text-xs">Unknown</div> <div className="text-xs">Unknown</div>
)} )}

View File

@ -35,7 +35,7 @@ export interface NezhaAPIHost {
BootTime: number; BootTime: number;
CountryCode: string; CountryCode: string;
Version: string; Version: string;
GPU: null; GPU: string[];
} }
export interface NezhaAPIStatus { export interface NezhaAPIStatus {