pull/54/head
accius 2 days ago
parent 072091ac79
commit 5f9409fb45

@ -99,6 +99,7 @@ const App = () => {
const [showSettings, setShowSettings] = useState(false); const [showSettings, setShowSettings] = useState(false);
const [showDXFilters, setShowDXFilters] = useState(false); const [showDXFilters, setShowDXFilters] = useState(false);
const [showPSKFilters, setShowPSKFilters] = useState(false); const [showPSKFilters, setShowPSKFilters] = useState(false);
const [weatherExpanded, setWeatherExpanded] = useState(false);
const [isFullscreen, setIsFullscreen] = useState(false); const [isFullscreen, setIsFullscreen] = useState(false);
// Map layer visibility // Map layer visibility
@ -613,117 +614,136 @@ const App = () => {
</div> </div>
</div> </div>
{/* Local Weather */} {/* Local Weather — compact by default, click to expand */}
{localWeather.data && ( {localWeather.data && (
<div style={{ marginTop: '12px', borderTop: '1px solid var(--border-color)', paddingTop: '12px' }}> <div style={{ marginTop: '12px', borderTop: '1px solid var(--border-color)', paddingTop: '10px' }}>
{/* Current conditions hero */} {/* Compact summary row — always visible */}
<div style={{ display: 'flex', alignItems: 'center', gap: '10px', marginBottom: '10px' }}> <div
<span style={{ fontSize: '28px', lineHeight: 1 }}>{localWeather.data.icon}</span> onClick={() => setWeatherExpanded(!weatherExpanded)}
<div style={{ flex: 1 }}> style={{
<div style={{ display: 'flex', alignItems: 'baseline', gap: '6px' }}> display: 'flex', alignItems: 'center', gap: '8px', cursor: 'pointer',
<span style={{ fontSize: '24px', fontWeight: '700', color: 'var(--text-primary)', fontFamily: 'Orbitron, monospace' }}> userSelect: 'none', padding: '2px 0',
{localWeather.data.temp}°F }}
</span> >
<span style={{ fontSize: '20px', lineHeight: 1 }}>{localWeather.data.icon}</span>
<span style={{ fontSize: '18px', fontWeight: '700', color: 'var(--text-primary)', fontFamily: 'Orbitron, monospace' }}>
{localWeather.data.temp}°F
</span>
<span style={{ fontSize: '11px', color: 'var(--text-secondary)', flex: 1 }}>{localWeather.data.description}</span>
<span style={{ fontSize: '11px', color: 'var(--text-muted)', fontFamily: 'JetBrains Mono, monospace' }}>
💨{localWeather.data.windSpeed}
</span>
<span style={{
fontSize: '10px', color: 'var(--text-muted)',
transform: weatherExpanded ? 'rotate(180deg)' : 'rotate(0deg)',
transition: 'transform 0.2s',
}}></span>
</div>
{/* Expanded details */}
{weatherExpanded && (
<div style={{ marginTop: '10px' }}>
{/* Feels like + hi/lo */}
<div style={{ display: 'flex', justifyContent: 'space-between', fontSize: '11px', marginBottom: '8px', fontFamily: 'JetBrains Mono, monospace' }}>
{localWeather.data.feelsLike !== localWeather.data.temp && (
<span style={{ color: 'var(--text-muted)' }}>Feels like {localWeather.data.feelsLike}°F</span>
)}
{localWeather.data.todayHigh != null && ( {localWeather.data.todayHigh != null && (
<span style={{ fontSize: '11px', color: 'var(--text-muted)', fontFamily: 'JetBrains Mono, monospace' }}> <span style={{ color: 'var(--text-muted)', marginLeft: 'auto' }}>
<span style={{ color: 'var(--accent-amber)' }}>{localWeather.data.todayHigh}°</span> <span style={{ color: 'var(--accent-amber)' }}>{localWeather.data.todayHigh}°</span>
{' '} {' '}
<span style={{ color: 'var(--accent-blue)' }}>{localWeather.data.todayLow}°</span> <span style={{ color: 'var(--accent-blue)' }}>{localWeather.data.todayLow}°</span>
</span> </span>
)} )}
</div> </div>
<div style={{ fontSize: '11px', color: 'var(--text-secondary)' }}>{localWeather.data.description}</div>
{localWeather.data.feelsLike !== localWeather.data.temp && ( {/* Detail grid */}
<div style={{ fontSize: '10px', color: 'var(--text-muted)' }}>Feels like {localWeather.data.feelsLike}°F</div> <div style={{
)} display: 'grid',
</div> gridTemplateColumns: '1fr 1fr',
</div> gap: '6px 12px',
fontSize: '11px',
{/* Detail grid */} fontFamily: 'JetBrains Mono, monospace',
<div style={{ }}>
display: 'grid', <div style={{ display: 'flex', justifyContent: 'space-between' }}>
gridTemplateColumns: '1fr 1fr', <span style={{ color: 'var(--text-muted)' }}>💨 Wind</span>
gap: '6px 12px', <span style={{ color: 'var(--text-secondary)' }}>{localWeather.data.windDir} {localWeather.data.windSpeed} mph</span>
fontSize: '11px', </div>
fontFamily: 'JetBrains Mono, monospace', <div style={{ display: 'flex', justifyContent: 'space-between' }}>
}}> <span style={{ color: 'var(--text-muted)' }}>💧 Humidity</span>
<div style={{ display: 'flex', justifyContent: 'space-between' }}> <span style={{ color: 'var(--text-secondary)' }}>{localWeather.data.humidity}%</span>
<span style={{ color: 'var(--text-muted)' }}>💨 Wind</span> </div>
<span style={{ color: 'var(--text-secondary)' }}>{localWeather.data.windDir} {localWeather.data.windSpeed} mph</span> {localWeather.data.windGusts > localWeather.data.windSpeed + 5 && (
</div> <div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', justifyContent: 'space-between' }}> <span style={{ color: 'var(--text-muted)' }}>🌬 Gusts</span>
<span style={{ color: 'var(--text-muted)' }}>💧 Humidity</span> <span style={{ color: 'var(--text-secondary)' }}>{localWeather.data.windGusts} mph</span>
<span style={{ color: 'var(--text-secondary)' }}>{localWeather.data.humidity}%</span> </div>
</div> )}
{localWeather.data.windGusts > localWeather.data.windSpeed + 5 && ( <div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', justifyContent: 'space-between' }}> <span style={{ color: 'var(--text-muted)' }}>🌡 Dew Pt</span>
<span style={{ color: 'var(--text-muted)' }}>🌬 Gusts</span> <span style={{ color: 'var(--text-secondary)' }}>{localWeather.data.dewPoint}°F</span>
<span style={{ color: 'var(--text-secondary)' }}>{localWeather.data.windGusts} mph</span> </div>
</div> {localWeather.data.pressure && (
)} <div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', justifyContent: 'space-between' }}> <span style={{ color: 'var(--text-muted)' }}>🔵 Pressure</span>
<span style={{ color: 'var(--text-muted)' }}>🌡 Dew Pt</span> <span style={{ color: 'var(--text-secondary)' }}>{localWeather.data.pressure} hPa</span>
<span style={{ color: 'var(--text-secondary)' }}>{localWeather.data.dewPoint}°F</span> </div>
</div> )}
{localWeather.data.pressure && ( <div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', justifyContent: 'space-between' }}> <span style={{ color: 'var(--text-muted)' }}> Clouds</span>
<span style={{ color: 'var(--text-muted)' }}>🔵 Pressure</span> <span style={{ color: 'var(--text-secondary)' }}>{localWeather.data.cloudCover}%</span>
<span style={{ color: 'var(--text-secondary)' }}>{localWeather.data.pressure} hPa</span> </div>
</div> {localWeather.data.visibility && (
)} <div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', justifyContent: 'space-between' }}> <span style={{ color: 'var(--text-muted)' }}>👁 Vis</span>
<span style={{ color: 'var(--text-muted)' }}> Clouds</span> <span style={{ color: 'var(--text-secondary)' }}>{localWeather.data.visibility} mi</span>
<span style={{ color: 'var(--text-secondary)' }}>{localWeather.data.cloudCover}%</span> </div>
</div> )}
{localWeather.data.visibility && ( {localWeather.data.uvIndex > 0 && (
<div style={{ display: 'flex', justifyContent: 'space-between' }}> <div style={{ display: 'flex', justifyContent: 'space-between' }}>
<span style={{ color: 'var(--text-muted)' }}>👁 Vis</span> <span style={{ color: 'var(--text-muted)' }}> UV</span>
<span style={{ color: 'var(--text-secondary)' }}>{localWeather.data.visibility} mi</span> <span style={{ color: localWeather.data.uvIndex >= 8 ? '#ef4444' : localWeather.data.uvIndex >= 6 ? '#f97316' : localWeather.data.uvIndex >= 3 ? '#eab308' : 'var(--text-secondary)' }}>
</div> {localWeather.data.uvIndex.toFixed(1)}
)} </span>
{localWeather.data.uvIndex > 0 && ( </div>
<div style={{ display: 'flex', justifyContent: 'space-between' }}> )}
<span style={{ color: 'var(--text-muted)' }}> UV</span>
<span style={{ color: localWeather.data.uvIndex >= 8 ? '#ef4444' : localWeather.data.uvIndex >= 6 ? '#f97316' : localWeather.data.uvIndex >= 3 ? '#eab308' : 'var(--text-secondary)' }}>
{localWeather.data.uvIndex.toFixed(1)}
</span>
</div> </div>
)}
</div> {/* 3-Day Forecast */}
{localWeather.data.daily?.length > 0 && (
{/* 3-Day Forecast */} <div style={{
{localWeather.data.daily?.length > 0 && ( marginTop: '10px',
<div style={{ paddingTop: '8px',
marginTop: '10px', borderTop: '1px solid var(--border-color)',
paddingTop: '8px', }}>
borderTop: '1px solid var(--border-color)', <div style={{ fontSize: '10px', color: 'var(--text-muted)', marginBottom: '6px', fontWeight: '600' }}>FORECAST</div>
}}> <div style={{ display: 'flex', gap: '4px' }}>
<div style={{ fontSize: '10px', color: 'var(--text-muted)', marginBottom: '6px', fontWeight: '600' }}>FORECAST</div> {localWeather.data.daily.map((day, i) => (
<div style={{ display: 'flex', gap: '4px' }}> <div key={i} style={{
{localWeather.data.daily.map((day, i) => ( flex: 1,
<div key={i} style={{ textAlign: 'center',
flex: 1, padding: '6px 2px',
textAlign: 'center', background: 'var(--bg-tertiary)',
padding: '6px 2px', borderRadius: '4px',
background: 'var(--bg-tertiary)', fontSize: '10px',
borderRadius: '4px', }}>
fontSize: '10px', <div style={{ color: 'var(--text-muted)', fontWeight: '600', marginBottom: '2px' }}>{i === 0 ? 'Today' : day.date}</div>
}}> <div style={{ fontSize: '16px', lineHeight: 1.2 }}>{day.icon}</div>
<div style={{ color: 'var(--text-muted)', fontWeight: '600', marginBottom: '2px' }}>{i === 0 ? 'Today' : day.date}</div> <div style={{ fontFamily: 'JetBrains Mono, monospace', marginTop: '2px' }}>
<div style={{ fontSize: '16px', lineHeight: 1.2 }}>{day.icon}</div> <span style={{ color: 'var(--accent-amber)' }}>{day.high}°</span>
<div style={{ fontFamily: 'JetBrains Mono, monospace', marginTop: '2px' }}> <span style={{ color: 'var(--text-muted)' }}>/</span>
<span style={{ color: 'var(--accent-amber)' }}>{day.high}°</span> <span style={{ color: 'var(--accent-blue)' }}>{day.low}°</span>
<span style={{ color: 'var(--text-muted)' }}>/</span> </div>
<span style={{ color: 'var(--accent-blue)' }}>{day.low}°</span> {day.precipProb > 0 && (
</div> <div style={{ color: 'var(--accent-blue)', fontSize: '9px', marginTop: '1px' }}>
{day.precipProb > 0 && ( 💧{day.precipProb}%
<div style={{ color: 'var(--accent-blue)', fontSize: '9px', marginTop: '1px' }}> </div>
💧{day.precipProb}% )}
</div> </div>
)} ))}
</div> </div>
))} </div>
</div> )}
</div> </div>
)} )}
</div> </div>

Loading…
Cancel
Save

Powered by TurnKey Linux.