From 5f9409fb45df5a088ff60a097a3328ed6433f3e2 Mon Sep 17 00:00:00 2001 From: accius Date: Mon, 2 Feb 2026 22:41:04 -0500 Subject: [PATCH] weather --- src/App.jsx | 220 ++++++++++++++++++++++++++++------------------------ 1 file changed, 120 insertions(+), 100 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index 485d7b9..c7e052a 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -99,6 +99,7 @@ const App = () => { const [showSettings, setShowSettings] = useState(false); const [showDXFilters, setShowDXFilters] = useState(false); const [showPSKFilters, setShowPSKFilters] = useState(false); + const [weatherExpanded, setWeatherExpanded] = useState(false); const [isFullscreen, setIsFullscreen] = useState(false); // Map layer visibility @@ -613,117 +614,136 @@ const App = () => { - {/* Local Weather */} + {/* Local Weather — compact by default, click to expand */} {localWeather.data && ( -
- {/* Current conditions hero */} -
- {localWeather.data.icon} -
-
- - {localWeather.data.temp}°F - +
+ {/* Compact summary row — always visible */} +
setWeatherExpanded(!weatherExpanded)} + style={{ + display: 'flex', alignItems: 'center', gap: '8px', cursor: 'pointer', + userSelect: 'none', padding: '2px 0', + }} + > + {localWeather.data.icon} + + {localWeather.data.temp}°F + + {localWeather.data.description} + + 💨{localWeather.data.windSpeed} + + +
+ + {/* Expanded details */} + {weatherExpanded && ( +
+ {/* Feels like + hi/lo */} +
+ {localWeather.data.feelsLike !== localWeather.data.temp && ( + Feels like {localWeather.data.feelsLike}°F + )} {localWeather.data.todayHigh != null && ( - + ▲{localWeather.data.todayHigh}° {' '} ▼{localWeather.data.todayLow}° )}
-
{localWeather.data.description}
- {localWeather.data.feelsLike !== localWeather.data.temp && ( -
Feels like {localWeather.data.feelsLike}°F
- )} -
-
- - {/* Detail grid */} -
-
- 💨 Wind - {localWeather.data.windDir} {localWeather.data.windSpeed} mph -
-
- 💧 Humidity - {localWeather.data.humidity}% -
- {localWeather.data.windGusts > localWeather.data.windSpeed + 5 && ( -
- 🌬️ Gusts - {localWeather.data.windGusts} mph -
- )} -
- 🌡️ Dew Pt - {localWeather.data.dewPoint}°F -
- {localWeather.data.pressure && ( -
- 🔵 Pressure - {localWeather.data.pressure} hPa -
- )} -
- ☁️ Clouds - {localWeather.data.cloudCover}% -
- {localWeather.data.visibility && ( -
- 👁️ Vis - {localWeather.data.visibility} mi -
- )} - {localWeather.data.uvIndex > 0 && ( -
- ☀️ UV - = 8 ? '#ef4444' : localWeather.data.uvIndex >= 6 ? '#f97316' : localWeather.data.uvIndex >= 3 ? '#eab308' : 'var(--text-secondary)' }}> - {localWeather.data.uvIndex.toFixed(1)} - + + {/* Detail grid */} +
+
+ 💨 Wind + {localWeather.data.windDir} {localWeather.data.windSpeed} mph +
+
+ 💧 Humidity + {localWeather.data.humidity}% +
+ {localWeather.data.windGusts > localWeather.data.windSpeed + 5 && ( +
+ 🌬️ Gusts + {localWeather.data.windGusts} mph +
+ )} +
+ 🌡️ Dew Pt + {localWeather.data.dewPoint}°F +
+ {localWeather.data.pressure && ( +
+ 🔵 Pressure + {localWeather.data.pressure} hPa +
+ )} +
+ ☁️ Clouds + {localWeather.data.cloudCover}% +
+ {localWeather.data.visibility && ( +
+ 👁️ Vis + {localWeather.data.visibility} mi +
+ )} + {localWeather.data.uvIndex > 0 && ( +
+ ☀️ UV + = 8 ? '#ef4444' : localWeather.data.uvIndex >= 6 ? '#f97316' : localWeather.data.uvIndex >= 3 ? '#eab308' : 'var(--text-secondary)' }}> + {localWeather.data.uvIndex.toFixed(1)} + +
+ )}
- )} -
- - {/* 3-Day Forecast */} - {localWeather.data.daily?.length > 0 && ( -
-
FORECAST
-
- {localWeather.data.daily.map((day, i) => ( -
-
{i === 0 ? 'Today' : day.date}
-
{day.icon}
-
- {day.high}° - / - {day.low}° -
- {day.precipProb > 0 && ( -
- 💧{day.precipProb}% + + {/* 3-Day Forecast */} + {localWeather.data.daily?.length > 0 && ( +
+
FORECAST
+
+ {localWeather.data.daily.map((day, i) => ( +
+
{i === 0 ? 'Today' : day.date}
+
{day.icon}
+
+ {day.high}° + / + {day.low}° +
+ {day.precipProb > 0 && ( +
+ 💧{day.precipProb}% +
+ )}
- )} + ))}
- ))} -
+
+ )}
)}