Add JMA Haneda temps and fix stale detail loading
This commit is contained in:
@@ -961,6 +961,10 @@
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.root :global(.forecast-inline-note) {
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
.root :global(.forecast-day) {
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
border: 1px solid var(--border-subtle);
|
||||
@@ -1000,6 +1004,31 @@
|
||||
color: var(--accent-cyan);
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
.root :global(.forecast-table) {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
overflow-x: auto;
|
||||
padding-bottom: 4px;
|
||||
scroll-snap-type: x proximity;
|
||||
}
|
||||
|
||||
.root :global(.forecast-table::-webkit-scrollbar) {
|
||||
height: 6px;
|
||||
}
|
||||
|
||||
.root :global(.forecast-table::-webkit-scrollbar-thumb) {
|
||||
background: rgba(148, 163, 184, 0.32);
|
||||
border-radius: 999px;
|
||||
}
|
||||
|
||||
.root :global(.forecast-day) {
|
||||
flex: 0 0 112px;
|
||||
min-width: 112px;
|
||||
scroll-snap-align: start;
|
||||
}
|
||||
}
|
||||
|
||||
.root :global(.sun-info) {
|
||||
margin-top: 10px;
|
||||
font-size: 12px;
|
||||
|
||||
@@ -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")} />
|
||||
|
||||
@@ -77,7 +77,8 @@ function DashboardScreen() {
|
||||
// Avoid full-page flashing on initial load; only show this overlay for manual refresh.
|
||||
const showLoading =
|
||||
store.loadingState.cities ||
|
||||
store.loadingState.refresh;
|
||||
store.loadingState.refresh ||
|
||||
store.loadingState.cityDetail;
|
||||
|
||||
return (
|
||||
<div className={styles.root}>
|
||||
|
||||
Reference in New Issue
Block a user