From 6f50522173d2cdc618ce95c575434cd6ee4622a3 Mon Sep 17 00:00:00 2001 From: Yoga Pratama Date: Mon, 9 Nov 2026 16:22:21 +0700 Subject: [PATCH] feat(dashboard): enlarge pulsing red Agent Server marker and add detailed color legend inside GlobeMap --- src/components/ui/GlobeMap.tsx | 86 +++++++++++++++++++++++++--------- 1 file changed, 65 insertions(+), 21 deletions(-) diff --git a/src/components/ui/GlobeMap.tsx b/src/components/ui/GlobeMap.tsx index b471d59..f484a57 100644 --- a/src/components/ui/GlobeMap.tsx +++ b/src/components/ui/GlobeMap.tsx @@ -21,6 +21,8 @@ export const GlobeMap = ({ data }: GlobeMapProps) => { } const { arcsData, pointsData, labelsData } = useGlobeData(data, isLight); + const destPoints = pointsData.filter((pt: any) => !pt.isOrigin); + const originPoints = pointsData.filter((pt: any) => pt.isOrigin); const mapBorderColor = isLight ? "#ffffff" : "#0ea5e9"; const mapFillColor = isLight ? "#4ade80" : "#0f172a"; @@ -34,9 +36,28 @@ export const GlobeMap = ({ data }: GlobeMapProps) => { stroke-dashoffset: -100; } } + @keyframes pulseOriginRing { + 0% { + transform: scale(0.8); + opacity: 0.9; + } + 70% { + transform: scale(2.2); + opacity: 0; + } + 100% { + transform: scale(2.2); + opacity: 0; + } + } .globe-animated-line { animation: flowDashGlobe 1.5s linear infinite; } + .globe-origin-pulse { + animation: pulseOriginRing 2s cubic-bezier(0, 0, 0.2, 1) infinite; + transform-origin: center; + transform-box: fill-box; + } `} { if (isLocal) { return ( - + ); } @@ -107,9 +128,9 @@ export const GlobeMap = ({ data }: GlobeMapProps) => { key={`arc-${i}`} coordinates={coordinates} stroke={color} - strokeWidth={1.5} + strokeWidth={1.6} strokeLinecap="round" - strokeOpacity={0.9} + strokeOpacity={0.92} strokeDasharray="2 4 4 4 8 78" className="globe-animated-line" style={{ pointerEvents: 'none' }} @@ -117,9 +138,20 @@ export const GlobeMap = ({ data }: GlobeMapProps) => { ); })} - {pointsData.map((pt: any, i: number) => ( - - + {/* External Country Destination Markers */} + {destPoints.map((pt: any, i: number) => ( + + + + + ))} + + {/* Agent Server Origin Markers (Rendered on top with large pulsing red beacon) */} + {originPoints.map((pt: any, i: number) => ( + + + + ))} @@ -127,7 +159,7 @@ export const GlobeMap = ({ data }: GlobeMapProps) => { { - {/* Direction & Node Legend Overlay */} -
- - - Agent Server - - - - Outbound (Agent → Luar) - - - - Inbound (Luar → Agent) - + {/* Keterangan / Noted Warna & Cara Baca Peta */} +
+
+ Keterangan Peta & Warna (Cara Baca): +
+
+
+ + + + + Titik Merah: Lokasi Server Agent +
+
+ + Titik Biru: Negara Tujuan / Luar +
+
+ + Garis Biru (→): Upload (Agent ke Luar) +
+
+ + Garis Hijau (←): Download (Luar ke Agent) +
+
);