mirror of
https://github.com/dergigi/boris.git
synced 2026-01-08 09:24:42 +01:00
fix: check actual relay connection status instead of pool membership
- Check relay.connected property to determine if relay is actually connected - Previously only checked if relay was in pool, not if connection was active - Add debug logging to help diagnose connection status issues - This should fix the airplane indicator not showing when offline - Relays should now correctly show as disconnected after being offline
This commit is contained in:
@@ -25,6 +25,18 @@ export const RelayStatusIndicator: React.FC<RelayStatusIndicatorProps> = ({ rela
|
||||
const localOnlyMode = hasLocalRelay && !hasRemoteRelay
|
||||
const offlineMode = connectedUrls.length === 0
|
||||
|
||||
// Debug logging
|
||||
React.useEffect(() => {
|
||||
if (localOnlyMode || offlineMode) {
|
||||
console.log('✈️ Relay Status Indicator:', {
|
||||
mode: offlineMode ? 'OFFLINE' : 'LOCAL_ONLY',
|
||||
connectedUrls,
|
||||
hasLocalRelay,
|
||||
hasRemoteRelay
|
||||
})
|
||||
}
|
||||
}, [localOnlyMode, offlineMode, connectedUrls.length])
|
||||
|
||||
// Don't show indicator when fully connected
|
||||
if (!localOnlyMode && !offlineMode) return null
|
||||
|
||||
|
||||
Reference in New Issue
Block a user