import useConnectionStore from '../store/connectionStore' import { fade } from '../logic/colour' /** * A 3px bar pinned to the very top of the screen (above the header). * Always visible — color signals connection state at a glance: * * liveAlive=true → solid green (live connection up) * online only → solid blue (HTTP reachable, live connection not up yet) * reconnecting → amber, animated sweep * offline → red, animated sweep * offline >5min → flashing red */ export default function ConnectivityBar() { const { status, liveAlive, flashing } = useConnectionStore() const isOnline = status === 'online' const isReconnecting = status === 'reconnecting' const color = isOnline ? (liveAlive ? 'var(--x-success)' : 'var(--x-info)') : isReconnecting ? 'var(--x-warning)' : 'var(--x-danger)' const animated = !isOnline return ( <>
) }