diff --git a/app/(main)/ClientComponents/detail/ServerDetailClient.tsx b/app/(main)/ClientComponents/detail/ServerDetailClient.tsx
index 62f79d164..2dd87fecb 100644
--- a/app/(main)/ClientComponents/detail/ServerDetailClient.tsx
+++ b/app/(main)/ClientComponents/detail/ServerDetailClient.tsx
@@ -104,7 +104,9 @@ export default function ServerDetailClient({ server_id }: { server_id: number })
{t("Uptime")}
{" "}
- {(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")}{" "}
diff --git a/app/(main)/ClientComponents/detail/ServerIPInfo.tsx b/app/(main)/ClientComponents/detail/ServerIPInfo.tsx
index c2ff3e151..1543e1d29 100644
--- a/app/(main)/ClientComponents/detail/ServerIPInfo.tsx
+++ b/app/(main)/ClientComponents/detail/ServerIPInfo.tsx
@@ -23,7 +23,7 @@ export default function ServerIPInfo({ server_id }: { server_id: number }) {
return (
<>
- {data.asn.autonomous_system_organization && (
+ {data.asn?.autonomous_system_organization && (
@@ -33,7 +33,7 @@ export default function ServerIPInfo({ server_id }: { server_id: number }) {
)}
- {data.asn.autonomous_system_number && (
+ {data.asn?.autonomous_system_number && (
@@ -43,7 +43,7 @@ export default function ServerIPInfo({ server_id }: { server_id: number }) {
)}
- {data.city.registered_country?.names.en && (
+ {data.city?.registered_country?.names.en && (
@@ -53,7 +53,7 @@ export default function ServerIPInfo({ server_id }: { server_id: number }) {
)}
- {data.city.country?.iso_code && (
+ {data.city?.country?.iso_code && (
@@ -63,7 +63,7 @@ export default function ServerIPInfo({ server_id }: { server_id: number }) {
)}
- {data.city.city?.names.en && (
+ {data.city?.city?.names.en && (
@@ -73,7 +73,7 @@ export default function ServerIPInfo({ server_id }: { server_id: number }) {
)}
- {data.city.location?.longitude && (
+ {data.city?.location?.longitude && (
@@ -83,7 +83,7 @@ export default function ServerIPInfo({ server_id }: { server_id: number }) {
)}
- {data.city.location?.latitude && (
+ {data.city?.location?.latitude && (
@@ -93,7 +93,7 @@ export default function ServerIPInfo({ server_id }: { server_id: number }) {
)}
- {data.city.location?.time_zone && (
+ {data.city?.location?.time_zone && (
@@ -103,7 +103,7 @@ export default function ServerIPInfo({ server_id }: { server_id: number }) {
)}
- {data.city.postal && (
+ {data.city?.postal && (
diff --git a/bun.lockb b/bun.lockb
index 2c967038b..3ef4697a6 100755
Binary files a/bun.lockb and b/bun.lockb differ
diff --git a/components/ServerCard.tsx b/components/ServerCard.tsx
index 41bd1c930..8f2b37661 100644
--- a/components/ServerCard.tsx
+++ b/components/ServerCard.tsx
@@ -130,34 +130,41 @@ export default function ServerCard({ serverInfo }: { serverInfo: NezhaAPISafe })
) : (
-
-
+
-
-
- {showFlag ? : null}
-
-
-
-
+
+
+ {showFlag ? : null}
+
+
+
+
+
)
}
diff --git a/messages/en.json b/messages/en.json
index 364733c59..dab238db4 100644
--- a/messages/en.json
+++ b/messages/en.json
@@ -74,6 +74,7 @@
"Offline": "Offline",
"Uptime": "Uptime",
"Days": "Days",
+ "Hours": "Hours",
"Version": "Version",
"Arch": "Arch",
"Mem": "Mem",
diff --git a/messages/ja.json b/messages/ja.json
index 56d966a0d..7099517ad 100644
--- a/messages/ja.json
+++ b/messages/ja.json
@@ -74,6 +74,7 @@
"Offline": "オフライン",
"Uptime": "稼働時間",
"Days": "日",
+ "Hours": "時間",
"Version": "バージョン",
"Arch": "アーキテクチャ",
"Mem": "メモリ",
diff --git a/messages/zh-t.json b/messages/zh-t.json
index cd6713c8f..15ad9b802 100644
--- a/messages/zh-t.json
+++ b/messages/zh-t.json
@@ -74,6 +74,7 @@
"Offline": "離線",
"Uptime": "稼働時間",
"Days": "天",
+ "Hours": "小時",
"Version": "版本",
"Arch": "架構",
"Mem": "記憶體",
diff --git a/messages/zh.json b/messages/zh.json
index f7a31464f..4071d286a 100644
--- a/messages/zh.json
+++ b/messages/zh.json
@@ -74,6 +74,7 @@
"Offline": "离线",
"Uptime": "运行时间",
"Days": "天",
+ "Hours": "小时",
"Version": "版本",
"Arch": "架构",
"Mem": "内存",
diff --git a/package.json b/package.json
index 65064a9f3..d27823ee5 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "nezha-dash",
- "version": "1.9.0",
+ "version": "1.9.1",
"private": true,
"scripts": {
"dev": "next dev -p 3040",
@@ -29,7 +29,7 @@
"@turf/turf": "^7.1.0",
"@types/d3-geo": "^3.1.0",
"@types/luxon": "^3.4.2",
- "@typescript-eslint/eslint-plugin": "^8.18.1",
+ "@typescript-eslint/eslint-plugin": "^8.18.2",
"caniuse-lite": "^1.0.30001690",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
@@ -54,10 +54,10 @@
"react-wrap-balancer": "^1.1.1",
"recharts": "^2.15.0",
"sharp": "^0.33.5",
- "swr": "^2.2.6-beta.5",
- "tailwind-merge": "^2.5.5",
+ "swr": "^2.3.0",
+ "tailwind-merge": "^2.6.0",
"tailwindcss-animate": "^1.0.7",
- "typescript-eslint": "^8.18.1"
+ "typescript-eslint": "^8.18.2"
},
"devDependencies": {
"@next/bundle-analyzer": "^15.1.2",