feat: add RunwayObservationsPanel component for tracking major Chinese airport runway temperatures
This commit is contained in:
@@ -42,7 +42,8 @@ function RunwayCityCard({
|
|||||||
const rows = getRunwayRows(detail);
|
const rows = getRunwayRows(detail);
|
||||||
const tempSymbol = detail?.temp_symbol || "°C";
|
const tempSymbol = detail?.temp_symbol || "°C";
|
||||||
const range = detail?.amos?.runway_temp_range;
|
const range = detail?.amos?.runway_temp_range;
|
||||||
const obsLocal = detail?.amos?.observation_time_local || detail?.amos?.observation_time;
|
const obsLocal =
|
||||||
|
detail?.amos?.observation_time_local || detail?.amos?.observation_time;
|
||||||
const hasAmsc = sourceIsAmsc(detail) && rows.length > 0;
|
const hasAmsc = sourceIsAmsc(detail) && rows.length > 0;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -57,7 +58,9 @@ function RunwayCityCard({
|
|||||||
<div className="monitor-high-row">
|
<div className="monitor-high-row">
|
||||||
<span className="monitor-stat-label">AMSC AWOS</span>
|
<span className="monitor-stat-label">AMSC AWOS</span>
|
||||||
<span className="monitor-high-value">
|
<span className="monitor-high-value">
|
||||||
{range ? `${range[0].toFixed(1)}–${range[1].toFixed(1)}${tempSymbol}` : "--"}
|
{range
|
||||||
|
? `${range[0].toFixed(1)}–${range[1].toFixed(1)}${tempSymbol}`
|
||||||
|
: "--"}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="monitor-obs-row">
|
<div className="monitor-obs-row">
|
||||||
@@ -78,10 +81,15 @@ function RunwayCityCard({
|
|||||||
<span className="monitor-rw-temp">TDZ / MID / END</span>
|
<span className="monitor-rw-temp">TDZ / MID / END</span>
|
||||||
</div>
|
</div>
|
||||||
{rows.map((row) => (
|
{rows.map((row) => (
|
||||||
<div key={row.runway || `${row.tdz_temp}-${row.end_temp}`} className="monitor-rw-row">
|
<div
|
||||||
|
key={row.runway || `${row.tdz_temp}-${row.end_temp}`}
|
||||||
|
className="monitor-rw-row"
|
||||||
|
>
|
||||||
<span className="monitor-rw-label">{row.runway || "--"}</span>
|
<span className="monitor-rw-label">{row.runway || "--"}</span>
|
||||||
<span className="monitor-rw-temp">
|
<span className="monitor-rw-temp">
|
||||||
{formatTemp(row.tdz_temp, tempSymbol)} / {formatTemp(row.mid_temp, tempSymbol)} / {formatTemp(row.end_temp, tempSymbol)}
|
{formatTemp(row.tdz_temp, tempSymbol)} /{" "}
|
||||||
|
{formatTemp(row.mid_temp, tempSymbol)} /{" "}
|
||||||
|
{formatTemp(row.end_temp, tempSymbol)}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
@@ -93,7 +101,9 @@ function RunwayCityCard({
|
|||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<div className="scan-empty-state compact">
|
<div className="scan-empty-state compact">
|
||||||
{isEn ? "No AMSC runway observation loaded yet." : "暂无 AMSC 跑道观测。"}
|
{isEn
|
||||||
|
? "No AMSC runway observation loaded yet."
|
||||||
|
: "暂无 AMSC 跑道观测。"}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</article>
|
</article>
|
||||||
@@ -143,11 +153,6 @@ export function RunwayObservationsPanel() {
|
|||||||
<div className="monitor-title">
|
<div className="monitor-title">
|
||||||
{isEn ? "Runway Observations" : "跑道观测"}
|
{isEn ? "Runway Observations" : "跑道观测"}
|
||||||
</div>
|
</div>
|
||||||
<div className="monitor-subtitle">
|
|
||||||
{isEn
|
|
||||||
? "AMSC AWOS · China mainland airports · TDZ/MID/END air temperature"
|
|
||||||
: "AMSC AWOS · 国内机场 · TDZ/MID/END 跑道观测点气温"}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
|||||||
Reference in New Issue
Block a user