feat: show highlight button only when viewing articles

- Only display the floating highlight button when currentArticle exists or selectedUrl is a nostr article
- Prevents highlight button from showing on external URLs, videos, or other content types
- Improves UX by showing highlight functionality only where it's relevant
This commit is contained in:
Gigi
2025-10-18 20:23:45 +02:00
parent 06763d5307
commit cf3ca2d527

View File

@@ -414,7 +414,7 @@ const ThreePaneLayout: React.FC<ThreePaneLayoutProps> = (props) => {
/> />
</div> </div>
</div> </div>
{props.hasActiveAccount && ( {props.hasActiveAccount && (props.currentArticle || (props.selectedUrl && props.selectedUrl.startsWith('nostr:'))) && (
<HighlightButton <HighlightButton
ref={props.highlightButtonRef} ref={props.highlightButtonRef}
onHighlight={props.onCreateHighlight} onHighlight={props.onCreateHighlight}