From 0317773a7d84af6ea9e31dbbfa9e084de8eae6d4 Mon Sep 17 00:00:00 2001 From: zurdi Date: Thu, 17 Sep 2026 17:30:48 +0200 Subject: [PATCH] feat(v2): smooth, scrubber-style track progress - usePlaybackTime advances the playing position every frame from the audio's coarse time reports, so the progress bar and the pill's ring move continuously instead of in steps. - SeekBar is the shared timeline for the soundtrack panel and the mini player card: elapsed time, a scrubber and the duration. While dragging it follows the finger rather than the playback clock, and only it re-renders per frame, not the whole panel or card. - RSlider gains a `scrubber` look (with a story): a thin track with no thumb at rest that thickens and shows a solid thumb on hover, keyboard focus or drag, which sets the progress bar apart from volume. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01S76JZm1jjh32KhBbPCBvGW --- .../components/Soundtrack/NowPlayingCard.vue | 51 +----------- .../components/Soundtrack/NowPlayingPill.vue | 15 ++-- .../src/v2/components/Soundtrack/Panel.vue | 50 +---------- .../src/v2/components/Soundtrack/SeekBar.vue | 83 +++++++++++++++++++ .../v2/composables/usePlaybackTime/index.ts | 50 +++++++++++ .../v2/lib/forms/RSlider/RSlider.stories.ts | 4 + frontend/src/v2/lib/forms/RSlider/RSlider.vue | 57 +++++++++++++ 7 files changed, 204 insertions(+), 106 deletions(-) create mode 100644 frontend/src/v2/components/Soundtrack/SeekBar.vue create mode 100644 frontend/src/v2/composables/usePlaybackTime/index.ts diff --git a/frontend/src/v2/components/Soundtrack/NowPlayingCard.vue b/frontend/src/v2/components/Soundtrack/NowPlayingCard.vue index 4f338b29a..08c36056c 100644 --- a/frontend/src/v2/components/Soundtrack/NowPlayingCard.vue +++ b/frontend/src/v2/components/Soundtrack/NowPlayingCard.vue @@ -1,7 +1,7 @@ diff --git a/frontend/src/v2/components/Soundtrack/Panel.vue b/frontend/src/v2/components/Soundtrack/Panel.vue index 58f68b1fc..631967775 100644 --- a/frontend/src/v2/components/Soundtrack/Panel.vue +++ b/frontend/src/v2/components/Soundtrack/Panel.vue @@ -6,7 +6,6 @@ import { RBtn, RIcon, RSkeletonBlock, - RSlider, RSpinner, RVirtualScroller, } from "@v2/lib"; @@ -20,6 +19,7 @@ import useSoundtrackPlayer, { } from "@/stores/soundtrackPlayer"; import AmbientArt from "@/v2/components/Soundtrack/AmbientArt.vue"; import NowPlayingChips from "@/v2/components/Soundtrack/NowPlayingChips.vue"; +import SeekBar from "@/v2/components/Soundtrack/SeekBar.vue"; import EmptyState from "@/v2/components/shared/EmptyState.vue"; import { useBreakpoint } from "@/v2/composables/useBreakpoint"; import { useCan } from "@/v2/composables/useCan"; @@ -94,8 +94,6 @@ const { track: activeStoreTrack, isPlaying, isBuffering, - currentTime, - duration, playlist, hasPrevious, hasNext, @@ -318,13 +316,6 @@ function downloadTrack(track: PanelTrack) { a.click(); a.remove(); } - -function seekValueText(v: number): string { - return t("rom.seek-progress", { - current: formatTrackTime(v), - duration: formatTrackTime(duration.value), - }); -}