mirror of
https://github.com/woodchen-ink/nezha-dash-v1.git
synced 2025-07-18 01:21:56 +08: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:
parent
7ffef91d2d
commit
5d7c07850a
@ -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>
|
||||
|
@ -55,6 +55,7 @@
|
||||
"status": "Status",
|
||||
"online": "Online",
|
||||
"days": "Days",
|
||||
"hours": "Hours",
|
||||
"offline": "Offline",
|
||||
"unknown": "Unknown",
|
||||
"uptime": "Uptime",
|
||||
|
@ -55,6 +55,7 @@
|
||||
"status": "状态",
|
||||
"online": "在线",
|
||||
"days": "天",
|
||||
"hours": "小时",
|
||||
"offline": "离线",
|
||||
"unknown": "未知",
|
||||
"uptime": "运行时间",
|
||||
|
@ -55,6 +55,7 @@
|
||||
"status": "狀態",
|
||||
"online": "線上",
|
||||
"days": "天",
|
||||
"hours": "小時",
|
||||
"offline": "離線",
|
||||
"unknown": "未知",
|
||||
"uptime": "運行時間",
|
||||
|
Loading…
x
Reference in New Issue
Block a user