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
@@ -1108,6 +1108,24 @@ export const zhTranslation = {
prev: '上一首',
play: '播放',
pause: '暂停',
delayModalTitle: '定时',
delayPauseSection: '多久后暂停',
delayStartSection: '多久后开始',
delaySchedulePause: '安排暂停',
delayScheduleStart: '安排开始',
delayCancelPause: '取消暂停定时',
delayCancelStart: '取消开始定时',
delayInactivePause: '仅在正在播放时可用。',
delayInactiveStart: '仅在暂停且已加载曲目或电台时可用。',
delayCustomMinutes: '自定义延迟(分钟)',
delayCustomPlaceholder: '例如 2.5',
closeDelayModal: '关闭',
delayIn: '还有',
delayFmtSec: '{{n}} 秒',
delayFmtMin: '{{n}} 分钟',
delayFmtHr: '{{n}} 小时',
delayCancel: '取消',
delayApply: '应用',
next: '下一首',
repeat: '重复',
repeatOff: '关闭',