From cc8b7427311feba46eee39cc315a750214b8059f Mon Sep 17 00:00:00 2001 From: Gigi Date: Thu, 9 Oct 2025 16:14:50 +0100 Subject: [PATCH] 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 --- src/components/HighlightItem.tsx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/components/HighlightItem.tsx b/src/components/HighlightItem.tsx index 88bd9fb9..2dca377e 100644 --- a/src/components/HighlightItem.tsx +++ b/src/components/HighlightItem.tsx @@ -178,16 +178,22 @@ export const HighlightItem: React.FC = ({ } } - 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 } }