From e90b9cf4d4176f192abd0b479ce03b964a4715ab Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Mon, 25 Nov 2024 18:08:42 +0800 Subject: [PATCH 1/7] fix: remove dev code --- app/(main)/ClientComponents/Global.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/(main)/ClientComponents/Global.tsx b/app/(main)/ClientComponents/Global.tsx index e257f4b..1982db0 100644 --- a/app/(main)/ClientComponents/Global.tsx +++ b/app/(main)/ClientComponents/Global.tsx @@ -20,10 +20,6 @@ export default async function ServerGlobal() { } }); - countrytList.push("TW"); - countrytList.push("SG"); - countrytList.push("RU"); - const width = 900; const height = 500; From 2e0c05f474cb4413a6f2f79a0420107d8f31093b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=93=E9=BC=A0?= <71394853+hamster1963@users.noreply.github.com> Date: Mon, 25 Nov 2024 18:30:04 +0800 Subject: [PATCH 2/7] fix(global): tooltip animation --- app/(main)/ClientComponents/InteractiveMap.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/(main)/ClientComponents/InteractiveMap.tsx b/app/(main)/ClientComponents/InteractiveMap.tsx index 3f2f096..5725bdb 100644 --- a/app/(main)/ClientComponents/InteractiveMap.tsx +++ b/app/(main)/ClientComponents/InteractiveMap.tsx @@ -92,8 +92,8 @@ export function InteractiveMap({ {tooltipData && ( Date: Mon, 25 Nov 2024 18:36:36 +0800 Subject: [PATCH 3/7] fix: remove mobile tooltip --- app/(main)/ClientComponents/InteractiveMap.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/(main)/ClientComponents/InteractiveMap.tsx b/app/(main)/ClientComponents/InteractiveMap.tsx index 5725bdb..d090599 100644 --- a/app/(main)/ClientComponents/InteractiveMap.tsx +++ b/app/(main)/ClientComponents/InteractiveMap.tsx @@ -94,7 +94,7 @@ export function InteractiveMap({ Date: Mon, 25 Nov 2024 21:55:22 +0800 Subject: [PATCH 4/7] feat(global): use geoEquirectangular --- app/(main)/ClientComponents/InteractiveMap.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/(main)/ClientComponents/InteractiveMap.tsx b/app/(main)/ClientComponents/InteractiveMap.tsx index d090599..96cdcfa 100644 --- a/app/(main)/ClientComponents/InteractiveMap.tsx +++ b/app/(main)/ClientComponents/InteractiveMap.tsx @@ -1,7 +1,7 @@ "use client"; import { countryCodeMapping } from "@/lib/geo"; -import { geoEqualEarth, geoPath } from "d3-geo"; +import { geoEquirectangular, geoPath } from "d3-geo"; import { AnimatePresence, m } from "framer-motion"; import { useTranslations } from "next-intl"; import { useState } from "react"; @@ -33,9 +33,10 @@ export function InteractiveMap({ .map((code) => countryCodeMapping[code]) .filter((code) => code !== undefined); - const projection = geoEqualEarth() - .scale(180) - .translate([width / 2, height / 2]); + const projection = geoEquirectangular() + .scale(140) + .translate([width / 2, height / 2]) + .rotate([-12, 0, 0]); const path = geoPath().projection(projection); @@ -59,7 +60,7 @@ export function InteractiveMap({ feature.properties.iso_a3, ); const countryCode = Object.entries(countryCodeMapping).find( - ([,alpha3]) => alpha3 === feature.properties.iso_a3, + ([, alpha3]) => alpha3 === feature.properties.iso_a3, )?.[0]; const serverCount = countryCode ? serverCounts[countryCode] || 0 From 252c64009c0b50f9d29e41f7afbb10febdb00d82 Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Mon, 25 Nov 2024 21:57:42 +0800 Subject: [PATCH 5/7] fix(global): hover color --- app/(main)/ClientComponents/InteractiveMap.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/(main)/ClientComponents/InteractiveMap.tsx b/app/(main)/ClientComponents/InteractiveMap.tsx index 96cdcfa..36fb46f 100644 --- a/app/(main)/ClientComponents/InteractiveMap.tsx +++ b/app/(main)/ClientComponents/InteractiveMap.tsx @@ -72,7 +72,7 @@ export function InteractiveMap({ d={path(feature) || ""} className={ isHighlighted - ? "fill-orange-500 hover:fill-orange-400 stroke-orange-500 dark:stroke-amber-900 dark:fill-amber-900 dark:hover:fill-amber-800 transition-all cursor-pointer" + ? "fill-orange-500 hover:fill-orange-300 stroke-orange-500 dark:stroke-amber-900 dark:fill-amber-900 dark:hover:fill-amber-700 transition-all cursor-pointer" : "fill-neutral-200/50 dark:fill-neutral-800 stroke-neutral-300/40 dark:stroke-neutral-700 stroke-[0.5]" } onMouseEnter={() => { From 24f19bfed964b6a449bcf13e3d85481f35faae32 Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Mon, 25 Nov 2024 22:14:31 +0800 Subject: [PATCH 6/7] fix(chart): remove YAxis mirrow --- app/(main)/ClientComponents/NetworkChart.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/(main)/ClientComponents/NetworkChart.tsx b/app/(main)/ClientComponents/NetworkChart.tsx index 074b0b1..c4ba3f3 100644 --- a/app/(main)/ClientComponents/NetworkChart.tsx +++ b/app/(main)/ClientComponents/NetworkChart.tsx @@ -182,7 +182,7 @@ export const NetworkChart = React.memo(function NetworkChart({
{chartButtons}
- + `${value}ms`} /> From 86c6de0cb56b5a0a03cb01940691331bfcd1d7ae Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Mon, 25 Nov 2024 22:15:34 +0800 Subject: [PATCH 7/7] update: v1.5.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0f4d967..5645798 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nezha-dash", - "version": "1.5.0", + "version": "1.5.1", "private": true, "scripts": { "dev": "next dev -p 3040",