From 8042edaeffa3505c1b353668b49cc15aea1ecf17 Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Wed, 4 Dec 2024 17:50:00 +0800 Subject: [PATCH 1/3] fix: scroll behavior --- app/(main)/ClientComponents/ServerDetailClient.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/(main)/ClientComponents/ServerDetailClient.tsx b/app/(main)/ClientComponents/ServerDetailClient.tsx index a7e9315..1421c6d 100644 --- a/app/(main)/ClientComponents/ServerDetailClient.tsx +++ b/app/(main)/ClientComponents/ServerDetailClient.tsx @@ -25,7 +25,7 @@ export default function ServerDetailClient({ const [hasHistory, setHasHistory] = useState(false); useEffect(() => { - window.scrollTo(0, 0); + window.scrollTo({ top: 0, left: 0, behavior: "instant" }); }, []); useEffect(() => { From 310e7d4338097fd8d1808f5b9295dd9a8b87e905 Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Wed, 4 Dec 2024 18:06:28 +0800 Subject: [PATCH 2/3] style: network display --- README.md | 2 +- .../ClientComponents/ServerOverviewClient.tsx | 28 +++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 00e641f..d7364e8 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ > [!CAUTION] > 此为 V0 兼容版本,与 V1 内置版本功能上可能有所不同 -> +> > V0 | V1 版本 issue 请在当前仓库发起 > [!TIP] diff --git a/app/(main)/ClientComponents/ServerOverviewClient.tsx b/app/(main)/ClientComponents/ServerOverviewClient.tsx index cacfa4b..7df36ae 100644 --- a/app/(main)/ClientComponents/ServerOverviewClient.tsx +++ b/app/(main)/ClientComponents/ServerOverviewClient.tsx @@ -175,29 +175,29 @@ export default function ServerOverviewClient() { }, )} > - +

{t("network")}

-
-

- ↑{formatBytes(data?.total_out_bandwidth || 0)} -

-

- ↓{formatBytes(data?.total_in_bandwidth || 0)} -

-
{data?.result ? ( <> -
-

- +

+

+ ↑{formatBytes(data?.total_out_bandwidth)} +

+

+ ↓{formatBytes(data?.total_in_bandwidth)} +

+
+
+

+ {formatBytes(data?.total_out_speed)}/s

-

+

{formatBytes( data?.total_in_speed, @@ -206,7 +206,7 @@ export default function ServerOverviewClient() {

) : ( -
+
)} From e51ec0866af20395aa46683b9e2cf8e77c7bde25 Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Wed, 4 Dec 2024 18:06:43 +0800 Subject: [PATCH 3/3] v1.6.11 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e9ed4c4..b471cd6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nezha-dash", - "version": "1.6.10", + "version": "1.6.11", "private": true, "scripts": { "dev": "next dev -p 3040",