From efb5e426b76e78d9a05d2f6402f848b6e4c2f9b0 Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Sun, 29 Mar 2026 21:09:16 +0800 Subject: [PATCH] Refine history modal loading state and MGM chart gating --- .../components/dashboard/Dashboard.module.css | 64 ++++++++++++++++++ .../components/dashboard/HistoryModal.tsx | 65 +++++++++++++++---- frontend/lib/dashboard-utils.ts | 7 ++ 3 files changed, 124 insertions(+), 12 deletions(-) diff --git a/frontend/components/dashboard/Dashboard.module.css b/frontend/components/dashboard/Dashboard.module.css index afd20562..bfd93088 100644 --- a/frontend/components/dashboard/Dashboard.module.css +++ b/frontend/components/dashboard/Dashboard.module.css @@ -2237,6 +2237,46 @@ height: 100% !important; } +.root :global(.history-modal .history-modal-loading) { + display: flex; + align-items: center; + justify-content: center; + min-height: 420px; +} + +.root :global(.history-modal .history-loading-card) { + min-width: min(100%, 420px); + padding: 22px 26px; + gap: 16px; + border-radius: 22px; +} + +.root :global(.history-modal .history-loading-card .loading-clouds), +.root :global(.history-modal .history-loading-card .loading-windfield) { + width: 180px; +} + +.root :global(.history-modal .history-loading-radar) { + width: 86px; + height: 86px; +} + +.root :global(.history-modal .history-loading-thermals) { + height: 22px; + gap: 6px; +} + +.root :global(.history-modal .history-loading-copy strong) { + font-size: 12px; + letter-spacing: 0.18em; +} + +.root :global(.history-modal .history-loading-copy span) { + max-width: 300px; + font-size: 12px; + line-height: 1.5; +} + .root :global(.history-modal .history-peak-reference) { margin-top: 18px; padding: 14px 16px; @@ -2315,6 +2355,10 @@ height: 360px; } + .root :global(.history-modal .history-modal-loading) { + min-height: 340px; + } + .root :global(.history-modal .history-peak-reference-scroll) { max-height: 320px; } @@ -2360,6 +2404,26 @@ padding: 8px 10px 6px; } + .root :global(.history-modal .history-modal-loading) { + min-height: 280px; + } + + .root :global(.history-modal .history-loading-card) { + width: 100%; + min-width: 0; + padding: 18px 16px; + } + + .root :global(.history-modal .history-loading-card .loading-clouds), + .root :global(.history-modal .history-loading-card .loading-windfield) { + width: 150px; + } + + .root :global(.history-modal .history-loading-radar) { + width: 72px; + height: 72px; + } + .root :global(.history-modal .history-peak-reference) { padding: 12px; } diff --git a/frontend/components/dashboard/HistoryModal.tsx b/frontend/components/dashboard/HistoryModal.tsx index c2a4e7fc..496912c2 100644 --- a/frontend/components/dashboard/HistoryModal.tsx +++ b/frontend/components/dashboard/HistoryModal.tsx @@ -28,6 +28,7 @@ function HistoryChart() { ); const hasMgm = store.selectedCity === "ankara" && + summary.mgmSeriesComplete && summary.mgms.some((value) => value != null); const hasBestBaseline = Boolean(summary.bestModelName) && @@ -260,20 +261,58 @@ export function HistoryModal() { : `${store.selectedDetail?.display_name || store.selectedCity || "该城市"}历史对账已按 NOAA ${noaaStationCode}(${noaaStationName})结算口径对齐:采用该日最终完成质控后的最高整度摄氏值。`} )} -