Add sleep timer to player bar (#1671)

* feat: add sleep timer to player bar

- Add sleep timer button in player bar right controls
- Preset options: End of song, 5/10/15/30/45 min, 1 hr, 2 hrs
- Custom timer with HH:MM:SS input fields
- Timer only counts down while music is playing
- Timer pauses playback when it expires
- End-of-song mode pauses at the next track change
- Uses theme-aware styling (--theme-colors-surface)
- Add sleepTimer/sleepTimerOff icons (LuTimer/LuTimerOff)
- Add i18n strings for sleep timer UI

---------

Co-authored-by: York <york@BonecharMac.local>
Co-authored-by: jeffvli <jeffvictorli@gmail.com>
This commit is contained in:
York
2026-02-11 13:19:37 +08:00
committed by GitHub
parent 496eab7d09
commit cc8cb4f4f1
6 changed files with 431 additions and 1 deletions
+4
View File
@@ -105,6 +105,8 @@ import {
LuStepForward,
LuSun,
LuTable,
LuTimer,
LuTimerOff,
LuTriangleAlert,
LuUpload,
LuUser,
@@ -237,6 +239,8 @@ export const AppIcon = {
share: LuShare2,
signIn: LuLogIn,
signOut: LuLogOut,
sleepTimer: LuTimer,
sleepTimerOff: LuTimerOff,
sort: LuArrowUpDown,
sortAsc: LuArrowUpNarrowWide,
sortDesc: LuArrowDownWideNarrow,