fix(highlights): always show relay indicator icon

Previously the relay indicator was only shown for highlights with publishedRelays info (user-created highlights). Now it's always visible:
- Show server icon by default for all highlights
- Show plane icon for local-only/offline highlights
- Show spinner during rebroadcast/sync
- Always allow clicking to rebroadcast any highlight
This commit is contained in:
Gigi
2025-10-09 16:14:50 +01:00
parent 529fc6b630
commit cc8b742731

View File

@@ -178,16 +178,22 @@ export const HighlightItem: React.FC<HighlightItemProps> = ({
}
}
if (!highlight.publishedRelays || highlight.publishedRelays.length === 0) {
return null
// Always show server icon, even if we don't have relay info
if (highlight.publishedRelays && highlight.publishedRelays.length > 0) {
const relayNames = highlight.publishedRelays.map(url =>
url.replace(/^wss?:\/\//, '').replace(/\/$/, '')
)
return {
icon: faServer,
tooltip: `Published to ${relayNames.length} relay(s):\n${relayNames.join('\n')}\n\nClick to rebroadcast`,
spin: false
}
}
const relayNames = highlight.publishedRelays.map(url =>
url.replace(/^wss?:\/\//, '').replace(/\/$/, '')
)
// Default server icon for highlights without relay info
return {
icon: faServer,
tooltip: `Published to ${relayNames.length} relay(s):\n${relayNames.join('\n')}\n\nClick to rebroadcast`,
tooltip: 'Click to rebroadcast to all relays',
spin: false
}
}