mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
feat: enhance uptime display to show days and hours
This commit is contained in:
parent
d2ab62efdc
commit
b630505ca3
@ -121,8 +121,8 @@ export default function ServerDetailClient({
|
|||||||
<div className="text-xs">
|
<div className="text-xs">
|
||||||
{" "}
|
{" "}
|
||||||
{uptime / 86400 >= 1
|
{uptime / 86400 >= 1
|
||||||
? `${(uptime / 86400).toFixed(0)} ${t("Days")}`
|
? `${Math.floor(uptime / 86400)} ${t("Days")} ${Math.floor((uptime % 86400) / 3600)} ${t("Hours")}`
|
||||||
: `${(uptime / 3600).toFixed(0)} ${t("Hours")}`}
|
: `${Math.floor(uptime / 3600)} ${t("Hours")}`}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
|
Loading…
Reference in New Issue
Block a user