Hold Cockpit regional news to the last 24 hours, and tell its states apart

Regional News showed "REGIONAL NEWS UNAVAILABLE" above populated rows and a
static "RECENT" footer over months-old articles. The status banner kept
`display: grid` when hidden, every non-empty answer carried the unavailable
text, and nothing limited or sorted articles by age.

- One window (regionalNewsWindow.js, 24 h): the local proxy asks Google News
  with `when:1d` and GDELT for 24 h, drops undated, older or future-dated
  articles, sorts newest first, and reports newsWindowHours/newsFetchedAt.
- The Cockpit labels four states: fresh (banner hidden, "LAST 24 H"),
  kept after a failed refresh ("CACHED · REFRESH FAILED"), no news in the
  window, and unavailable. The footer lives in the news state, so it
  survives page and tab changes, and the client drops out-of-window rows.
- `.cockpit-brief-status[hidden]` now hides the banner.
This commit is contained in:
Denis Groshev committed 2026-11-06 00:45:19 +01:00
1 parent 2470b39f88
commit dd83812a21
24 files changed
+637 -85

No files matched your search

+4 -3
View File
@@ -1567,14 +1567,15 @@
"Cycle briefing pages automatically every 9 seconds (Signals → News → Local). Pauses while you hover or focus the panel. Live signal data refreshes continuously either way.": "每 9 秒自動輪換簡報頁面(信號 → 新聞 → 本地)。懸停或聚焦面板時暫停。無論是否輪換,實時信號數據都會持續刷新。",
"ACQUIRING REGIONAL NEWS": "正在獲取地區新聞",
"REGIONAL NEWS UNAVAILABLE": "地區新聞不可用",
"CACHED · REFRESH FAILED": "快取 · 重新整理失敗",
"RESOLVING REGION": "正在解析區域",
"REGION UNAVAILABLE": "區域不可用",
"NO RECENT LOCATION MATCHES": "暫無近期位置匹配結果",
"NO NEWS IN THE LAST {hours} H": "過去 {hours} 小時無新聞",
"{domain} · {age}": "{domain} · {age}",
"{value} KM/H": "{value} km/h",
"CLOUD {pct}%": "雲量 {pct}%",
"CLOUD UNKNOWN": "雲量未知",
"{source} · LOCATION QUERY": "{source} · 位置查詢",
"{source} · CACHED {age}": "{source} · 快取 {age}",
"REGIONAL NEWS": "地區新聞",
"{label} · {radius} AIR/SEA WINDOW": "{label} · {radius} 空/海監視窗口",
"{scope} · INSTALLATIONS {coverage}": "{scope} · 設施 {coverage}",
@@ -1632,7 +1633,7 @@
"OBSERVED / MAPPED PINGS": "觀測 / 地圖標註目標",
"SOURCE-BACKED EVENTS · NO SYNTHETIC NEWS": "來源可查的事件 · 無合成新聞",
"LATEST LOCATION-MATCHED REPORTING": "當前地區最新報道",
"{source} · LOCATION QUERY · RECENT": "{source} · 位置查詢 · 近期",
"{source} · LAST {hours} H": "{source} · 過去 {hours} 小時",
"LOCAL INFO": "本地信息",
"PLACE / CONDITIONS / POSITION": "地點 / 狀況 / 位置",
"TIME UNKNOWN": "時間未知",