feat(player): web queue auto-follow + jump-to-current pill + clear-queue — #1944
test-web / test (push) Successful in 40s
test-web / test (push) Successful in 40s
QueueList now follows the now-playing row as the track auto-advances (only while it's in view), centers it on open, and surfaces a 'Jump to current' pill once the user scrolls it off-screen. Header gains a clear-queue action backed by a new store clearQueue() that empties the queue and stops playback. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -505,6 +505,21 @@ export function removeFromQueue(idx: number): void {
|
||||
_error = null;
|
||||
}
|
||||
|
||||
// Clear the whole queue and stop playback — mirrors removeFromQueue's
|
||||
// empty-queue branch. Also drops the radio/system source + self-heal closure
|
||||
// so the emptied player doesn't try to refill from a now-irrelevant source.
|
||||
export function clearQueue(): void {
|
||||
_queue = [];
|
||||
_index = 0;
|
||||
_state = 'idle';
|
||||
_position = 0;
|
||||
_duration = 0;
|
||||
_error = null;
|
||||
_radioSeedId = null;
|
||||
_queueSource = null;
|
||||
_queueRefetch = null;
|
||||
}
|
||||
|
||||
export function playFromQueueIndex(idx: number): void {
|
||||
if (idx < 0 || idx >= _queue.length) return;
|
||||
_radioSeedId = null;
|
||||
|
||||
Reference in New Issue
Block a user