mirror of
https://github.com/dergigi/boris.git
synced 2026-01-29 03:34:43 +01:00
feat: add auto-mark as read at 100% reading progress
- Add autoMarkAsReadAt100 setting (default: false) - Add checkbox in Layout & Behavior settings - Automatically mark article as read after 2 seconds at 100% progress - Trigger same animation as manual mark as read button - Move isNostrArticle computation earlier for useCallback deps - Move handleMarkAsRead to useCallback for use in auto-mark effect
This commit is contained in:
@@ -130,6 +130,19 @@ const LayoutBehaviorSettings: React.FC<LayoutBehaviorSettingsProps> = ({ setting
|
||||
<span>Auto-scroll to last reading position</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div className="setting-group">
|
||||
<label htmlFor="autoMarkAsReadAt100" className="checkbox-label">
|
||||
<input
|
||||
id="autoMarkAsReadAt100"
|
||||
type="checkbox"
|
||||
checked={settings.autoMarkAsReadAt100 ?? false}
|
||||
onChange={(e) => onUpdate({ autoMarkAsReadAt100: e.target.checked })}
|
||||
className="setting-checkbox"
|
||||
/>
|
||||
<span>Automatically mark as read when reading progress is 100%</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user