feat(player): sleep timer and delayed start via long-press on play/pause (#270)

Add scheduled pause and resume timers in the player store, cleared on stop
and track changes. Long-press opens a compact preset modal anchored above
the transport row; one-tap presets plus custom minutes. Portaled countdown
badge on the play button; clear the long-press click guard when the modal
closes so the first play/pause click works after scheduling.
This commit is contained in:
cucadmuh
2026-04-23 00:32:44 +03:00
committed by GitHub
parent c5dfabf739
commit 624ce56faf
17 changed files with 942 additions and 20 deletions
+18
View File
@@ -1128,6 +1128,24 @@ export const enTranslation = {
prev: 'Previous Track',
play: 'Play',
pause: 'Pause',
delayModalTitle: 'Timer',
delayPauseSection: 'Pause after',
delayStartSection: 'Start after',
delaySchedulePause: 'Schedule pause',
delayScheduleStart: 'Schedule start',
delayCancelPause: 'Cancel pause timer',
delayCancelStart: 'Cancel start timer',
delayInactivePause: 'Available only while something is playing.',
delayInactiveStart: 'Available when paused with a track or radio loaded.',
delayCustomMinutes: 'Custom delay (minutes)',
delayCustomPlaceholder: 'e.g. 2.5',
closeDelayModal: 'Close',
delayIn: 'in',
delayFmtSec: '{{n}}s',
delayFmtMin: '{{n}} min',
delayFmtHr: '{{n}} h',
delayCancel: 'Cancel',
delayApply: 'Apply',
next: 'Next Track',
repeat: 'Repeat',
repeatOff: 'Off',