mirror of
https://github.com/dergigi/boris.git
synced 2025-12-26 19:14:52 +01:00
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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user