unify space weather

pull/102/head
accius 1 day ago
parent 17709ff0ec
commit 6ad93e381d

@ -460,7 +460,7 @@ const App = () => {
</div>
<div style={{ marginBottom: '6px' }}>
<div style={{ color: '#888' }}>Kp</div>
<div style={{ color: '#00ff00', fontSize: '16px', fontWeight: '700' }}>{spaceWeather?.data?.kIndex ?? '--'}</div>
<div style={{ color: '#00ff00', fontSize: '16px', fontWeight: '700' }}>{solarIndices?.data?.kp?.current ?? spaceWeather?.data?.kIndex ?? '--'}</div>
</div>
<div style={{ marginBottom: '6px' }}>
<div style={{ color: '#888' }}>Bz</div>
@ -596,6 +596,7 @@ const App = () => {
localDate={localDate}
localWeather={localWeather}
spaceWeather={spaceWeather}
solarIndices={solarIndices}
use12Hour={use12Hour}
onTimeFormatToggle={handleTimeFormatToggle}
onSettingsClick={() => setShowSettings(true)}

@ -12,6 +12,7 @@ export const Header = ({
localDate,
localWeather,
spaceWeather,
solarIndices,
use12Hour,
onTimeFormatToggle,
onSettingsClick,
@ -113,17 +114,17 @@ export const Header = ({
})()}
<div>
<span style={{ color: 'var(--text-muted)' }}>SFI </span>
<span style={{ color: 'var(--accent-amber)', fontWeight: '700' }}>{spaceWeather?.data?.solarFlux || '--'}</span>
<span style={{ color: 'var(--accent-amber)', fontWeight: '700' }}>{solarIndices?.data?.sfi?.current || spaceWeather?.data?.solarFlux || '--'}</span>
</div>
<div>
<span style={{ color: 'var(--text-muted)' }}>K </span>
<span style={{ color: parseInt(spaceWeather?.data?.kIndex) >= 4 ? 'var(--accent-red)' : 'var(--accent-green)', fontWeight: '700' }}>
{spaceWeather?.data?.kIndex ?? '--'}
<span style={{ color: parseInt(solarIndices?.data?.kp?.current ?? spaceWeather?.data?.kIndex) >= 4 ? 'var(--accent-red)' : 'var(--accent-green)', fontWeight: '700' }}>
{solarIndices?.data?.kp?.current ?? spaceWeather?.data?.kIndex ?? '--'}
</span>
</div>
<div>
<span style={{ color: 'var(--text-muted)' }}>SSN </span>
<span style={{ color: 'var(--accent-cyan)', fontWeight: '700' }}>{spaceWeather?.data?.sunspotNumber || '--'}</span>
<span style={{ color: 'var(--accent-cyan)', fontWeight: '700' }}>{solarIndices?.data?.ssn?.current || spaceWeather?.data?.sunspotNumber || '--'}</span>
</div>
</div>

Loading…
Cancel
Save

Powered by TurnKey Linux.