mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-02-05 13:10:09 +00:00
feat: enhance uptime display with hours (#36)
* feat: enhance uptime display with hours and update translations for hours * chore: auto-fix linting and formatting issues
This commit is contained in:
@@ -117,7 +117,9 @@ export default function ServerDetailOverview({ server_id }: { server_id: string
|
||||
<p className="text-xs text-muted-foreground">{t("serverDetail.uptime")}</p>
|
||||
<div className="text-xs">
|
||||
{" "}
|
||||
{online ? (uptime / 86400).toFixed(0) : "N/A"} {t("serverDetail.days")}
|
||||
{uptime / 86400 >= 1
|
||||
? `${Math.floor(uptime / 86400)} ${t("serverDetail.days")} ${Math.floor((uptime % 86400) / 3600)} ${t("serverDetail.hours")}`
|
||||
: `${Math.floor(uptime / 3600)} ${t("serverDetail.hours")}`}
|
||||
</div>
|
||||
</section>
|
||||
</CardContent>
|
||||
|
||||
Reference in New Issue
Block a user