style: better inline card

This commit is contained in:
hamster1963 2024-12-01 19:05:08 +08:00
parent 6980b6e6e8
commit 70038f9044
3 changed files with 15 additions and 9 deletions

View File

@ -209,7 +209,9 @@ export default function ServerDetailClient({
{data.status.Load1} / {data.status.Load5} /{" "}
{data.status.Load15}
</div>
) : <div className="text-xs">Unknown</div>}
) : (
<div className="text-xs">Unknown</div>
)}
</section>
</CardContent>
</Card>
@ -222,7 +224,9 @@ export default function ServerDetailClient({
{" "}
{formatBytes(data.status.NetOutTransfer)}{" "}
</div>
) : <div className="text-xs">Unknown</div>}
) : (
<div className="text-xs">Unknown</div>
)}
</section>
</CardContent>
</Card>
@ -235,7 +239,9 @@ export default function ServerDetailClient({
{" "}
{formatBytes(data.status.NetInTransfer)}{" "}
</div>
) : <div className="text-xs">Unknown</div>}
) : (
<div className="text-xs">Unknown</div>
)}
</section>
</CardContent>
</Card>

View File

@ -162,7 +162,7 @@ export default function ServerListClient() {
{inline === "1" && (
<section
ref={containerRef}
className="flex flex-col gap-2 overflow-x-scroll"
className="flex flex-col gap-2 overflow-x-scroll scrollbar-hidden"
>
{filteredServers.map((serverInfo) => (
<ServerCardInline key={serverInfo.id} serverInfo={serverInfo} />

View File

@ -79,7 +79,7 @@ export default function ServerCardInline({
</div>
</div>
</div>
<div className={"flex w-14 flex-col"}>
<div className={"flex w-20 flex-col"}>
<p className="text-xs text-muted-foreground">{t("Uptime")}</p>
<div className="flex items-center text-xs font-semibold">
{(serverInfo?.status.Uptime / 86400).toFixed(0)} {"Days"}
@ -106,7 +106,7 @@ export default function ServerCardInline({
</div>
<ServerUsageBar value={stg} />
</div>
<div className={"flex w-14 flex-col"}>
<div className={"flex w-16 flex-col"}>
<p className="text-xs text-muted-foreground">{t("Upload")}</p>
<div className="flex items-center text-xs font-semibold">
{up >= 1024
@ -114,7 +114,7 @@ export default function ServerCardInline({
: `${up.toFixed(2)}M/s`}
</div>
</div>
<div className={"flex w-14 flex-col"}>
<div className={"flex w-16 flex-col"}>
<p className="text-xs text-muted-foreground">{t("Download")}</p>
<div className="flex items-center text-xs font-semibold">
{down >= 1024
@ -122,7 +122,7 @@ export default function ServerCardInline({
: `${down.toFixed(2)}M/s`}
</div>
</div>
<div className={"flex flex-col"}>
<div className={"flex w-20 flex-col"}>
<p className="text-xs text-muted-foreground">
{t("TotalUpload")}
</p>
@ -130,7 +130,7 @@ export default function ServerCardInline({
{formatBytes(serverInfo.status.NetOutTransfer)}
</div>
</div>
<div className={"flex flex-col"}>
<div className={"flex w-20 flex-col"}>
<p className="text-xs text-muted-foreground">
{t("TotalDownload")}
</p>