Add JMA Haneda temps and fix stale detail loading

This commit is contained in:
2569718930@qq.com
2026-04-08 16:20:02 +08:00
parent 7b1f34db27
commit 6f80d31852
10 changed files with 347 additions and 13 deletions
@@ -724,6 +724,7 @@ export function ForecastTable() {
if (!data) return null;
const daily = data.forecast?.daily || [];
const isSparseDaily = daily.length <= 1;
const resolveForecastTemp = (date: string, fallback: number | null | undefined) => {
const debPrediction = data.multi_model_daily?.[date]?.deb?.prediction;
return debPrediction ?? fallback ?? null;
@@ -731,6 +732,20 @@ export function ForecastTable() {
return (
<section className="forecast-section">
<h3>{t("forecast.title")}</h3>
{isSparseDaily && (
<div
className="forecast-inline-note"
style={{
color: "var(--text-secondary)",
fontSize: "12px",
marginBottom: "10px",
}}
>
{store.loadingState.cityDetail
? "多日预报同步中,正在刷新完整日序列。"
: "当前只收到当日预报,其他日期结果暂未回传。"}
</div>
)}
<div className="forecast-table">
{daily.length === 0 ? (
<EmptyState text={t("forecast.empty")} />