From bdb314d1a7b1cafd02a362e5642e4f67dd8c9361 Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Mon, 25 May 2026 01:26:03 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=88=E7=AB=AF=E9=A1=B6=E6=A0=8F=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E4=B8=AD=E8=8B=B1=E6=96=87=E8=AF=AD=E8=A8=80=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit KoyfinWeatherTerminal 顶栏右侧添加 EN/中文 切换组件,样式与落地页一致。 Refresh 按钮文字同步支持国际化。 Tested: npm run build 通过 --- .../dashboard/ScanTerminalDashboard.tsx | 39 ++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/frontend/components/dashboard/ScanTerminalDashboard.tsx b/frontend/components/dashboard/ScanTerminalDashboard.tsx index 3a9a2371..36dc5408 100644 --- a/frontend/components/dashboard/ScanTerminalDashboard.tsx +++ b/frontend/components/dashboard/ScanTerminalDashboard.tsx @@ -325,20 +325,24 @@ function MarketTable({ function KoyfinWeatherTerminal({ generatedText, isEn, + locale, onRefresh, refreshing, rows, selectedRow, setSelectedRow, + toggleLocale, userLocalTime, }: { generatedText: string; isEn: boolean; + locale: "zh-CN" | "en-US"; onRefresh: () => void; refreshing: boolean; rows: ScanOpportunityRow[]; selectedRow: ScanOpportunityRow | null; setSelectedRow: (row: ScanOpportunityRow) => void; + toggleLocale: () => void; userLocalTime: string; }) { const topRows = rows.slice(0, 18); @@ -404,6 +408,35 @@ function KoyfinWeatherTerminal({
{userLocalTime} + {/* Language toggle — matches landing page style */} + ("zh-CN"); const isEn = locale === "en-US"; + const toggleLocale = () => + setLocale((prev) => (prev === "zh-CN" ? "en-US" : "zh-CN")); const [hydrated, setHydrated] = useState(false); const [localFullAccess, setLocalFullAccess] = useState(false); const canUseLocalFullAccess = hydrated && localFullAccess; @@ -957,11 +992,13 @@ function ScanTerminalScreen() { setSelectedId(row.id)} + toggleLocale={toggleLocale} userLocalTime={userLocalTime} /> );