mirror of
https://github.com/dergigi/boris.git
synced 2025-12-18 23:24:22 +01:00
refactor: reorder Reading & Display settings
- Highlight Style (first) - Paragraph Alignment (second) - Reading Font + Font Size (third) Better logical grouping with text styling before font selection
This commit is contained in:
@@ -19,6 +19,46 @@ const ReadingDisplaySettings: React.FC<ReadingDisplaySettingsProps> = ({ setting
|
|||||||
<div className="settings-section">
|
<div className="settings-section">
|
||||||
<h3 className="section-title">Reading & Display</h3>
|
<h3 className="section-title">Reading & Display</h3>
|
||||||
|
|
||||||
|
<div className="setting-group setting-inline">
|
||||||
|
<label>Highlight Style</label>
|
||||||
|
<div className="setting-buttons">
|
||||||
|
<IconButton
|
||||||
|
icon={faHighlighter}
|
||||||
|
onClick={() => onUpdate({ highlightStyle: 'marker' })}
|
||||||
|
title="Text marker style"
|
||||||
|
ariaLabel="Text marker style"
|
||||||
|
variant={(settings.highlightStyle || 'marker') === 'marker' ? 'primary' : 'ghost'}
|
||||||
|
/>
|
||||||
|
<IconButton
|
||||||
|
icon={faUnderline}
|
||||||
|
onClick={() => onUpdate({ highlightStyle: 'underline' })}
|
||||||
|
title="Underline style"
|
||||||
|
ariaLabel="Underline style"
|
||||||
|
variant={settings.highlightStyle === 'underline' ? 'primary' : 'ghost'}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="setting-group setting-inline">
|
||||||
|
<label>Paragraph Alignment</label>
|
||||||
|
<div className="setting-buttons">
|
||||||
|
<IconButton
|
||||||
|
icon={faAlignLeft}
|
||||||
|
onClick={() => onUpdate({ paragraphAlignment: 'left' })}
|
||||||
|
title="Left aligned"
|
||||||
|
ariaLabel="Left aligned"
|
||||||
|
variant={settings.paragraphAlignment === 'left' ? 'primary' : 'ghost'}
|
||||||
|
/>
|
||||||
|
<IconButton
|
||||||
|
icon={faAlignJustify}
|
||||||
|
onClick={() => onUpdate({ paragraphAlignment: 'justify' })}
|
||||||
|
title="Justified"
|
||||||
|
ariaLabel="Justified"
|
||||||
|
variant={(settings.paragraphAlignment || 'justify') === 'justify' ? 'primary' : 'ghost'}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div style={{ display: 'flex', gap: '1rem', flexWrap: 'wrap' }}>
|
<div style={{ display: 'flex', gap: '1rem', flexWrap: 'wrap' }}>
|
||||||
<div className="setting-group setting-inline" style={{ flex: '1 1 auto', minWidth: '200px' }}>
|
<div className="setting-group setting-inline" style={{ flex: '1 1 auto', minWidth: '200px' }}>
|
||||||
<label htmlFor="readingFont">Reading Font</label>
|
<label htmlFor="readingFont">Reading Font</label>
|
||||||
@@ -48,46 +88,6 @@ const ReadingDisplaySettings: React.FC<ReadingDisplaySettingsProps> = ({ setting
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="setting-group setting-inline">
|
|
||||||
<label>Paragraph Alignment</label>
|
|
||||||
<div className="setting-buttons">
|
|
||||||
<IconButton
|
|
||||||
icon={faAlignLeft}
|
|
||||||
onClick={() => onUpdate({ paragraphAlignment: 'left' })}
|
|
||||||
title="Left aligned"
|
|
||||||
ariaLabel="Left aligned"
|
|
||||||
variant={settings.paragraphAlignment === 'left' ? 'primary' : 'ghost'}
|
|
||||||
/>
|
|
||||||
<IconButton
|
|
||||||
icon={faAlignJustify}
|
|
||||||
onClick={() => onUpdate({ paragraphAlignment: 'justify' })}
|
|
||||||
title="Justified"
|
|
||||||
ariaLabel="Justified"
|
|
||||||
variant={(settings.paragraphAlignment || 'justify') === 'justify' ? 'primary' : 'ghost'}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="setting-group setting-inline">
|
|
||||||
<label>Highlight Style</label>
|
|
||||||
<div className="setting-buttons">
|
|
||||||
<IconButton
|
|
||||||
icon={faHighlighter}
|
|
||||||
onClick={() => onUpdate({ highlightStyle: 'marker' })}
|
|
||||||
title="Text marker style"
|
|
||||||
ariaLabel="Text marker style"
|
|
||||||
variant={(settings.highlightStyle || 'marker') === 'marker' ? 'primary' : 'ghost'}
|
|
||||||
/>
|
|
||||||
<IconButton
|
|
||||||
icon={faUnderline}
|
|
||||||
onClick={() => onUpdate({ highlightStyle: 'underline' })}
|
|
||||||
title="Underline style"
|
|
||||||
ariaLabel="Underline style"
|
|
||||||
variant={settings.highlightStyle === 'underline' ? 'primary' : 'ghost'}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="setting-group setting-inline">
|
<div className="setting-group setting-inline">
|
||||||
<label className="setting-label">My Highlights</label>
|
<label className="setting-label">My Highlights</label>
|
||||||
<div className="setting-control">
|
<div className="setting-control">
|
||||||
|
|||||||
Reference in New Issue
Block a user