feat(settings): restore 'auto mark as read at 100%' option

- Added autoMarkAsReadOnCompletion to default settings (disabled by default)
- Added toggle in Layout & Behavior section
- Existing ContentPanel logic already hooks into this to trigger animation & mark-as-read
This commit is contained in:
Gigi
2025-10-19 16:07:59 +02:00
parent b745a92a7e
commit 87e46be86f
2 changed files with 14 additions and 0 deletions

View File

@@ -40,6 +40,7 @@ const DEFAULT_SETTINGS: UserSettings = {
rebroadcastToAllRelays: false,
paragraphAlignment: 'justify',
syncReadingPosition: true,
autoMarkAsReadOnCompletion: false,
}
interface SettingsProps {

View File

@@ -117,6 +117,19 @@ const LayoutBehaviorSettings: React.FC<LayoutBehaviorSettingsProps> = ({ setting
<span>Sync reading position across devices</span>
</label>
</div>
<div className="setting-group">
<label htmlFor="autoMarkAsReadOnCompletion" className="checkbox-label">
<input
id="autoMarkAsReadOnCompletion"
type="checkbox"
checked={settings.autoMarkAsReadOnCompletion ?? false}
onChange={(e) => onUpdate({ autoMarkAsReadOnCompletion: e.target.checked })}
className="setting-checkbox"
/>
<span>Automatically mark as read at 100% (with animation)</span>
</label>
</div>
</div>
)
}