From 0d5dc6e7857ff5dfbe6f925096c72163af5bc00c Mon Sep 17 00:00:00 2001 From: Gigi Date: Sun, 12 Oct 2025 23:48:18 +0200 Subject: [PATCH] feat: apply 'my highlights' color to collapsed highlights button - Update HighlightsPanelCollapsed to accept settings prop - Apply highlightColorMine to the expand button icon and text - Pass settings through HighlightsPanel and ThreePaneLayout --- src/components/HighlightsPanel.tsx | 6 +++++- .../HighlightsPanel/HighlightsPanelCollapsed.tsx | 8 +++++++- src/components/ThreePaneLayout.tsx | 1 + 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/components/HighlightsPanel.tsx b/src/components/HighlightsPanel.tsx index e93af712..0029aece 100644 --- a/src/components/HighlightsPanel.tsx +++ b/src/components/HighlightsPanel.tsx @@ -8,6 +8,7 @@ import HighlightsPanelCollapsed from './HighlightsPanel/HighlightsPanelCollapsed import HighlightsPanelHeader from './HighlightsPanel/HighlightsPanelHeader' import { RelayPool } from 'applesauce-relay' import { IEventStore } from 'applesauce-core' +import { UserSettings } from '../services/settingsService' export interface HighlightVisibility { nostrverse: boolean @@ -32,6 +33,7 @@ interface HighlightsPanelProps { followedPubkeys?: Set relayPool?: RelayPool | null eventStore?: IEventStore | null + settings?: UserSettings } export const HighlightsPanel: React.FC = ({ @@ -50,7 +52,8 @@ export const HighlightsPanel: React.FC = ({ onHighlightVisibilityChange, followedPubkeys = new Set(), relayPool, - eventStore + eventStore, + settings }) => { const [showHighlights, setShowHighlights] = useState(true) const [localHighlights, setLocalHighlights] = useState(highlights) @@ -90,6 +93,7 @@ export const HighlightsPanel: React.FC = ({ 0} onToggleCollapse={onToggleCollapse} + settings={settings} /> ) } diff --git a/src/components/HighlightsPanel/HighlightsPanelCollapsed.tsx b/src/components/HighlightsPanel/HighlightsPanelCollapsed.tsx index 00c84158..0e37bde8 100644 --- a/src/components/HighlightsPanel/HighlightsPanelCollapsed.tsx +++ b/src/components/HighlightsPanel/HighlightsPanelCollapsed.tsx @@ -1,16 +1,21 @@ import React from 'react' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faHighlighter, faChevronRight } from '@fortawesome/free-solid-svg-icons' +import { UserSettings } from '../../services/settingsService' interface HighlightsPanelCollapsedProps { hasHighlights: boolean onToggleCollapse: () => void + settings?: UserSettings } const HighlightsPanelCollapsed: React.FC = ({ hasHighlights, - onToggleCollapse + onToggleCollapse, + settings }) => { + const highlightColor = settings?.highlightColorMine || '#ffff00' + return (