mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-02-06 05:30:07 +00:00
feat: network speed KiB unit
This commit is contained in:
@@ -103,13 +103,21 @@ export default function ServerCard({ now, serverInfo }: { now: number; serverInf
|
|||||||
<div className={"flex w-14 flex-col"}>
|
<div className={"flex w-14 flex-col"}>
|
||||||
<p className="text-xs text-muted-foreground">{t("serverCard.upload")}</p>
|
<p className="text-xs text-muted-foreground">{t("serverCard.upload")}</p>
|
||||||
<div className="flex items-center text-xs font-semibold">
|
<div className="flex items-center text-xs font-semibold">
|
||||||
{up >= 1024 ? `${(up / 1024).toFixed(2)}G/s` : `${up.toFixed(2)}M/s`}
|
{up >= 1024
|
||||||
|
? `${(up / 1024).toFixed(2)}G/s`
|
||||||
|
: up >= 1
|
||||||
|
? `${up.toFixed(2)}M/s`
|
||||||
|
: `${(up * 1024).toFixed(2)}K/s`}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={"flex w-14 flex-col"}>
|
<div className={"flex w-14 flex-col"}>
|
||||||
<p className="text-xs text-muted-foreground">{t("serverCard.download")}</p>
|
<p className="text-xs text-muted-foreground">{t("serverCard.download")}</p>
|
||||||
<div className="flex items-center text-xs font-semibold">
|
<div className="flex items-center text-xs font-semibold">
|
||||||
{down >= 1024 ? `${(down / 1024).toFixed(2)}G/s` : `${down.toFixed(2)}M/s`}
|
{down >= 1024
|
||||||
|
? `${(down / 1024).toFixed(2)}G/s`
|
||||||
|
: up >= 1
|
||||||
|
? `${down.toFixed(2)}M/s`
|
||||||
|
: `${(down * 1024).toFixed(2)}K/s`}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -138,13 +138,21 @@ export default function ServerCardInline({
|
|||||||
<div className={"flex w-16 flex-col"}>
|
<div className={"flex w-16 flex-col"}>
|
||||||
<p className="text-xs text-muted-foreground">{t("serverCard.upload")}</p>
|
<p className="text-xs text-muted-foreground">{t("serverCard.upload")}</p>
|
||||||
<div className="flex items-center text-xs font-semibold">
|
<div className="flex items-center text-xs font-semibold">
|
||||||
{up >= 1024 ? `${(up / 1024).toFixed(2)}G/s` : `${up.toFixed(2)}M/s`}
|
{up >= 1024
|
||||||
|
? `${(up / 1024).toFixed(2)}G/s`
|
||||||
|
: up >= 1
|
||||||
|
? `${up.toFixed(2)}M/s`
|
||||||
|
: `${(up * 1024).toFixed(2)}K/s`}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={"flex w-16 flex-col"}>
|
<div className={"flex w-16 flex-col"}>
|
||||||
<p className="text-xs text-muted-foreground">{t("serverCard.download")}</p>
|
<p className="text-xs text-muted-foreground">{t("serverCard.download")}</p>
|
||||||
<div className="flex items-center text-xs font-semibold">
|
<div className="flex items-center text-xs font-semibold">
|
||||||
{down >= 1024 ? `${(down / 1024).toFixed(2)}G/s` : `${down.toFixed(2)}M/s`}
|
{down >= 1024
|
||||||
|
? `${(down / 1024).toFixed(2)}G/s`
|
||||||
|
: up >= 1
|
||||||
|
? `${down.toFixed(2)}M/s`
|
||||||
|
: `${(down * 1024).toFixed(2)}K/s`}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={"flex w-20 flex-col"}>
|
<div className={"flex w-20 flex-col"}>
|
||||||
|
|||||||
Reference in New Issue
Block a user