fix: apply highlight group color to background of count indicator

- Change highlight count indicator to use backgroundColor instead of color
- Set text color to black for contrast against colored backgrounds
- Maintains priority: nostrverse > friends > mine
This commit is contained in:
Gigi
2025-10-12 23:48:56 +02:00
parent 0d5dc6e785
commit 8a8419385e

View File

@@ -86,7 +86,10 @@ const ReaderHeader: React.FC<ReaderHeaderProps> = ({
{hasHighlights && (
<div
className="highlight-indicator"
style={highlightIndicatorColor ? { color: highlightIndicatorColor } : undefined}
style={highlightIndicatorColor ? {
backgroundColor: highlightIndicatorColor,
color: '#000'
} : undefined}
>
<FontAwesomeIcon icon={faHighlighter} />
<span>{highlightCount} highlight{highlightCount !== 1 ? 's' : ''}</span>
@@ -126,7 +129,10 @@ const ReaderHeader: React.FC<ReaderHeaderProps> = ({
{hasHighlights && (
<div
className="highlight-indicator"
style={highlightIndicatorColor ? { color: highlightIndicatorColor } : undefined}
style={highlightIndicatorColor ? {
backgroundColor: highlightIndicatorColor,
color: '#000'
} : undefined}
>
<FontAwesomeIcon icon={faHighlighter} />
<span>{highlightCount} highlight{highlightCount !== 1 ? 's' : ''}</span>