From 2cd43b607dd48e3b6d143cf0a068042d8414c7c0 Mon Sep 17 00:00:00 2001
From: "2569718930@qq.com" <2569718930@qq.com>
Date: Mon, 25 May 2026 20:23:44 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E7=90=86=E6=97=B6=E5=8C=BA=E9=80=BB?=
=?UTF-8?q?=E8=BE=91=EF=BC=9ATRADING=5FREGIONS=E2=86=92REGIONS=EF=BC=8C?=
=?UTF-8?q?=E7=A7=BB=E9=99=A4=20detectLocalRegion/TZ=20fallback=EF=BC=8C?=
=?UTF-8?q?=E7=94=A8=20CITY=5FREGION=20=E7=A1=AC=E7=BC=96=E7=A0=81?=
=?UTF-8?q?=E6=9B=BF=E4=BB=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../dashboard/ScanTerminalDashboard.tsx | 16 ++---
.../LiveTemperatureThresholdChart.tsx | 9 ++-
.../scan-terminal/continent-grouping.ts | 72 +++++--------------
3 files changed, 32 insertions(+), 65 deletions(-)
diff --git a/frontend/components/dashboard/ScanTerminalDashboard.tsx b/frontend/components/dashboard/ScanTerminalDashboard.tsx
index b57798fe..50dd123b 100644
--- a/frontend/components/dashboard/ScanTerminalDashboard.tsx
+++ b/frontend/components/dashboard/ScanTerminalDashboard.tsx
@@ -27,9 +27,9 @@ import {
getGapColor,
getSignalLabel,
getSignalState,
- resolveTradingRegionKey,
- TRADING_REGIONS,
- detectLocalRegion,
+ getCityRegion,
+ REGIONS,
+ getDefaultRegion,
} from "@/components/dashboard/scan-terminal/continent-grouping";
import { MobileCityCard } from "@/components/dashboard/scan-terminal/MobileCityCard";
import { MobileRegionTabs } from "@/components/dashboard/scan-terminal/MobileRegionTabs";
@@ -290,7 +290,7 @@ function PolyWeatherTerminal({
const filteredRegionRows = useMemo(() => {
return rows.filter(
- (row) => resolveTradingRegionKey(row) === selectedRegionKey,
+ (row) => getCityRegion(row) === selectedRegionKey,
);
}, [rows, selectedRegionKey]);
@@ -504,7 +504,7 @@ function PolyWeatherTerminal({
<>
{/* Region tabs */}
- {TRADING_REGIONS.filter((r) => visibleRegions.has(r.key)).map((r) => ({
+ {REGIONS.filter((r) => visibleRegions.has(r.key)).map((r) => ({
key: r.key,
labelEn: r.labelEn.toUpperCase(),
labelZh: r.labelZh,
@@ -540,7 +540,7 @@ function PolyWeatherTerminal({
id="region-selector-popover"
className="hidden absolute right-0 top-full mt-1 z-50 bg-white border border-slate-200 rounded-lg shadow-lg p-2 min-w-[180px]"
>
- {TRADING_REGIONS.map((r) => {
+ {REGIONS.map((r) => {
const checked = visibleRegions.has(r.key);
return (