fix(overview): text display

This commit is contained in:
hamster1963
2024-12-03 23:51:24 +08:00
parent 8515674d72
commit 8010b69d79
6 changed files with 49 additions and 44 deletions

View File

@@ -221,22 +221,24 @@ export default function ServerDetailOverview({
</section>
</CardContent>
</Card>
{server?.state.temperatures && server?.state.temperatures.length > 0 && (
<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">{"温度"}</p>
<section className="flex items-start gap-2">
{server?.state.temperatures.map((item,index) => (
<div className="text-xs flex items-center" key={index}>
<p className=" font-semibold">{item.Name}</p>: {item.Temperature.toFixed(2)} °C
</div>
))}
</section>
</section>
</CardContent>
</Card>
)}
{server?.state.temperatures &&
server?.state.temperatures.length > 0 && (
<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">{"温度"}</p>
<section className="flex items-start gap-2">
{server?.state.temperatures.map((item, index) => (
<div className="text-xs flex items-center" key={index}>
<p className=" font-semibold">{item.Name}</p>:{" "}
{item.Temperature.toFixed(2)} °C
</div>
))}
</section>
</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">