mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 06:25:41 +00:00
feat(player): polish sleep-timer UI — circular ring + in-button countdown (#272)
Replaces the text-pill schedule badge with a circular SVG progress ring
around the play/pause button. Accent→lavender gradient stroke, counter-
clockwise depletion synced to the armed deadline, subtle accent glow.
While a timer is armed, the Play/Pause icon inside the button is
swapped for a two-line stack: a small Moon (sleep timer) or Sunrise
(delayed start) glyph above the countdown (m:ss / h:mm:ss). The icon
is the mode marker so the ring can stay unified with the rest of the
app's accent palette.
Redesigns the schedule modal with a mood-tinted header (Moon for
"Pause after", Sunrise for "Start after"), soft radial accent glow in
the background, slide-up open animation. Circular glass close-button
scoped to this modal, with hover rotation + focus ring. Custom-minutes
field gains an inline "min" suffix. A live preview line at the bottom
shows when the action fires ("Pauses at 23:47" / "Starts at 23:47"),
updating as the user hovers a preset or types. Chips gain a small
hover lift plus accent-coloured shadow.
Also fixes a pre-existing duplicate-tooltip on the play/pause button:
title= attributes removed alongside the data-tooltip (title violates
the project's "never native tooltips" rule, so both showed at once).
Adds scheduledPauseStartMs / scheduledResumeStartMs to the player
store so the progress ring has a total-duration baseline, set and
cleared alongside the existing deadline fields.
New usePlaybackScheduleRemaining hook wraps the store subscription
and 500 ms tick into a single hook used by all three player views
(PlayerBar / FullscreenPlayer / MobilePlayerView).
i18n: delayPreviewPause / delayPreviewStart keys across all 8 locales.
Co-authored-by: Psychotoxical <dev@psysonic.app>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
624ce56faf
commit
694567843f
@@ -1129,6 +1129,8 @@ export const deTranslation = {
|
||||
delayModalTitle: 'Timer',
|
||||
delayPauseSection: 'Pause nach',
|
||||
delayStartSection: 'Start nach',
|
||||
delayPreviewPause: 'Pause um',
|
||||
delayPreviewStart: 'Start um',
|
||||
delaySchedulePause: 'Pause planen',
|
||||
delayScheduleStart: 'Start planen',
|
||||
delayCancelPause: 'Pause-Timer abbrechen',
|
||||
|
||||
@@ -1131,6 +1131,8 @@ export const enTranslation = {
|
||||
delayModalTitle: 'Timer',
|
||||
delayPauseSection: 'Pause after',
|
||||
delayStartSection: 'Start after',
|
||||
delayPreviewPause: 'Pauses at',
|
||||
delayPreviewStart: 'Starts at',
|
||||
delaySchedulePause: 'Schedule pause',
|
||||
delayScheduleStart: 'Schedule start',
|
||||
delayCancelPause: 'Cancel pause timer',
|
||||
|
||||
@@ -1122,6 +1122,8 @@ export const esTranslation = {
|
||||
delayModalTitle: 'Temporizador',
|
||||
delayPauseSection: 'Pausar después de',
|
||||
delayStartSection: 'Iniciar después de',
|
||||
delayPreviewPause: 'Pausa a las',
|
||||
delayPreviewStart: 'Inicio a las',
|
||||
delaySchedulePause: 'Programar pausa',
|
||||
delayScheduleStart: 'Programar inicio',
|
||||
delayCancelPause: 'Cancelar temporizador de pausa',
|
||||
|
||||
@@ -1117,6 +1117,8 @@ export const frTranslation = {
|
||||
delayModalTitle: 'Minuteur',
|
||||
delayPauseSection: 'Pause après',
|
||||
delayStartSection: 'Démarrage après',
|
||||
delayPreviewPause: 'Pause à',
|
||||
delayPreviewStart: 'Démarrage à',
|
||||
delaySchedulePause: 'Programmer la pause',
|
||||
delayScheduleStart: 'Programmer le démarrage',
|
||||
delayCancelPause: 'Annuler le minuteur de pause',
|
||||
|
||||
@@ -1116,6 +1116,8 @@ export const nbTranslation = {
|
||||
delayModalTitle: 'Tidsur',
|
||||
delayPauseSection: 'Pause etter',
|
||||
delayStartSection: 'Start etter',
|
||||
delayPreviewPause: 'Pause kl.',
|
||||
delayPreviewStart: 'Start kl.',
|
||||
delaySchedulePause: 'Planlegg pause',
|
||||
delayScheduleStart: 'Planlegg start',
|
||||
delayCancelPause: 'Avbryt pause-timer',
|
||||
|
||||
@@ -1116,6 +1116,8 @@ export const nlTranslation = {
|
||||
delayModalTitle: 'Timer',
|
||||
delayPauseSection: 'Pauzeren na',
|
||||
delayStartSection: 'Starten na',
|
||||
delayPreviewPause: 'Pauze om',
|
||||
delayPreviewStart: 'Start om',
|
||||
delaySchedulePause: 'Pauze plannen',
|
||||
delayScheduleStart: 'Start plannen',
|
||||
delayCancelPause: 'Pauze-timer annuleren',
|
||||
|
||||
@@ -1194,6 +1194,8 @@ export const ruTranslation = {
|
||||
delayModalTitle: 'Таймер',
|
||||
delayPauseSection: 'Пауза через',
|
||||
delayStartSection: 'Старт через',
|
||||
delayPreviewPause: 'Пауза в',
|
||||
delayPreviewStart: 'Старт в',
|
||||
delaySchedulePause: 'Запланировать паузу',
|
||||
delayScheduleStart: 'Запланировать старт',
|
||||
delayCancelPause: 'Отменить таймер паузы',
|
||||
|
||||
@@ -1111,6 +1111,8 @@ export const zhTranslation = {
|
||||
delayModalTitle: '定时',
|
||||
delayPauseSection: '多久后暂停',
|
||||
delayStartSection: '多久后开始',
|
||||
delayPreviewPause: '暂停于',
|
||||
delayPreviewStart: '开始于',
|
||||
delaySchedulePause: '安排暂停',
|
||||
delayScheduleStart: '安排开始',
|
||||
delayCancelPause: '取消暂停定时',
|
||||
|
||||
Reference in New Issue
Block a user