Skip to content

Commit

Permalink
feat: uptime days unit
Browse files Browse the repository at this point in the history
  • Loading branch information
hamster1963 committed Dec 24, 2024
1 parent 682e4cc commit 114a6f9
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/(main)/ClientComponents/detail/ServerDetailClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ export default function ServerDetailClient({ server_id }: { server_id: number })
<p className="text-xs text-muted-foreground">{t("Uptime")}</p>
<div className="text-xs">
{" "}
{(data?.status.Uptime / 86400).toFixed(0)} {t("Days")}{" "}
{data?.status.Uptime / 86400 >= 1
? (data?.status.Uptime / 86400).toFixed(0) + " " + t("Days")
: (data?.status.Uptime / 3600).toFixed(0) + " " + t("Hours")}{" "}
</div>
</section>
</CardContent>
Expand Down
1 change: 1 addition & 0 deletions messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"Offline": "Offline",
"Uptime": "Uptime",
"Days": "Days",
"Hours": "Hours",
"Version": "Version",
"Arch": "Arch",
"Mem": "Mem",
Expand Down
1 change: 1 addition & 0 deletions messages/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"Offline": "オフライン",
"Uptime": "稼働時間",
"Days": "",
"Hours": "時間",
"Version": "バージョン",
"Arch": "アーキテクチャ",
"Mem": "メモリ",
Expand Down
1 change: 1 addition & 0 deletions messages/zh-t.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"Offline": "離線",
"Uptime": "稼働時間",
"Days": "",
"Hours": "小時",
"Version": "版本",
"Arch": "架構",
"Mem": "記憶體",
Expand Down
1 change: 1 addition & 0 deletions messages/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"Offline": "离线",
"Uptime": "运行时间",
"Days": "",
"Hours": "小时",
"Version": "版本",
"Arch": "架构",
"Mem": "内存",
Expand Down

0 comments on commit 114a6f9

Please sign in to comment.