diff --git a/frontend/components/dashboard/FutureForecastModal.tsx b/frontend/components/dashboard/FutureForecastModal.tsx index 1d529cd8..e12b1103 100644 --- a/frontend/components/dashboard/FutureForecastModal.tsx +++ b/frontend/components/dashboard/FutureForecastModal.tsx @@ -26,7 +26,6 @@ import { } from "@/components/dashboard/PanelSections"; import { getFutureModalView, - getAirportNarrative, getTodayPaceView, parseAiAnalysis, getTemperatureChartData, @@ -1004,71 +1003,6 @@ export function FutureForecastModal() { ...getCurrentMetricDescriptor("visibility", visibilityText, visibilityValue), }, ]; - const ai = getAirportNarrative(detail, locale); - const risk = detail.risk || {}; - const settlementSourceCode = String( - detail.current?.settlement_source || "", - ).toLowerCase(); - const isOfficialSettlementSource = - settlementSourceCode === "hko" || - settlementSourceCode === "cwa" || - settlementSourceCode === "noaa" || - settlementSourceCode === "wunderground"; - const settlementProfileLabel = isOfficialSettlementSource - ? locale === "en-US" - ? "Settlement station" - : "结算站点" - : t("section.airport"); - const settlementStationLabel = - detail.settlement_station?.settlement_station_label || - detail.current?.station_name || - risk.airport || - noaaStationName; - const settlementStationCode = - detail.settlement_station?.settlement_station_code || - detail.current?.station_code || - risk.icao || - noaaStationCode; - const settlementProfileValue = - settlementStationLabel - ? `${settlementStationLabel}${settlementStationCode ? ` (${settlementStationCode})` : ""}` - : "--"; - const airportPrimary = detail.airport_primary || detail.airport_current; - const airportCurrentText = - airportPrimary?.temp != null - ? `${airportPrimary.temp}${detail.temp_symbol}${ - airportPrimary?.obs_time - ? ` @${airportPrimary.obs_time}` - : "" - }` - : "--"; - const airportMaxText = - airportPrimary?.max_so_far != null - ? `${airportPrimary.max_so_far}${detail.temp_symbol}${ - airportPrimary?.max_temp_time - ? ` @${airportPrimary.max_temp_time}` - : "" - }` - : "--"; - const officialNearbyCount = Array.isArray(detail.official_nearby) - ? detail.official_nearby.length - : Array.isArray(detail.mgm_nearby) - ? detail.mgm_nearby.length - : 0; - const officialNetworkSourceText = - detail.official_network_status?.provider_label || - detail.official_network_source || - "--"; - const officialNetworkStatusText = - detail.official_network_status?.mode || - "--"; - const airportVsNetworkDeltaText = - detail.airport_vs_network_delta != null && - Number.isFinite(Number(detail.airport_vs_network_delta)) - ? `${Number(detail.airport_vs_network_delta) > 0 ? "+" : ""}${Number( - detail.airport_vs_network_delta, - ).toFixed(1)}${detail.temp_symbol}` - : "--"; const displayedUpperAirSummary = marketAwareUpperAirCue?.summary || view.front.upperAirSummary; const displayedUpperAirMetrics = (view.front.upperAirMetrics || []).map( @@ -1484,103 +1418,20 @@ export function FutureForecastModal() {

{locale === "en-US" - ? "City Risk Profile & Airport Narrative" - : "城市风险档案与机场报文解读"} + ? "Current Metrics" + : "当前指标补充"}

-
-
-
- {locale === "en-US" ? "City Risk Profile" : "城市风险档案"} -
-
- {!risk.airport ? ( - - {t("section.noRiskProfile")} - - ) : ( - <> -
- - {settlementProfileLabel} - - {settlementProfileValue} -
-
- - {locale === "en-US" ? "Airport primary" : "机场主站"} - - {airportCurrentText} -
-
- - {locale === "en-US" ? "Airport max today" : "机场今日最高"} - - {airportMaxText} -
-
- - {locale === "en-US" ? "Official nearby" : "官方周边站"} - - - {officialNearbyCount} · {officialNetworkSourceText} - -
-
- - {locale === "en-US" ? "Network mode" : "站网模式"} - - {officialNetworkStatusText} -
-
- - {locale === "en-US" - ? "Airport vs network" - : "机场相对站网偏差"} - - {airportVsNetworkDeltaText} -
-
- - {t("section.distance")} - - {risk.distance_km ?? "--"}km -
- {risk.warning ? ( -
- - {t("section.note")} - - {risk.warning} -
- ) : null} - - )} -
+
+
+ {locale === "en-US" ? "Day high so far" : "日内已见高点"} + + {topObservedTemp ?? "--"} + {detail.temp_symbol} +
-
-
- {locale === "en-US" ? "Airport Narrative" : "机场报文解读"} -
-
- {!ai.summary && ai.bullets.length === 0 ? ( - - {t("future.noAi")} - - ) : ( - <> - {ai.summary ? ( -
{ai.summary}
- ) : null} - {ai.bullets.length > 0 ? ( -
    - {ai.bullets.map((item) => ( -
  • {item}
  • - ))} -
- ) : null} - - )} -
+
+ {locale === "en-US" ? "Current obs" : "当前观测"} + {currentTempText}