feat: implement dashboard state management, API proxy layer, and modular UI components for weather monitoring and payments

This commit is contained in:
2569718930@qq.com
2026-05-14 15:05:13 +08:00
parent 02add6d994
commit c9d03fd3e1
30 changed files with 2213 additions and 1933 deletions
+11
View File
@@ -204,6 +204,17 @@ export function buildObservationFreshness({
export function getObservationFreshness(detail?: CityDetail | null) {
if (!detail) return null;
const hasAmosRunway =
(detail.amos?.runway_obs?.temperatures?.length || 0) > 0 ||
(detail.amos?.runway_temps?.length || 0) > 0;
if (hasAmosRunway || detail.amos?.source === "amos") {
return buildObservationFreshness({
observedAt: detail.amos?.observation_time || null,
observedAtLocal: detail.airport_current?.obs_time || detail.current?.obs_time || null,
sourceCode: "amos",
sourceLabel: detail.amos?.source_label || "AMOS",
});
}
const currentSource = canonicalSourceCode(
detail.current?.source_code ||
detail.current?.settlement_source ||