feat: Spotify-style shuffle — pre-shuffle queue, each song plays once

Shuffle now shuffles the queue array once (current song first, rest
randomised behind it) instead of picking a random index on every skip.
Toggling shuffle off restores the original queue order. Removed the
'once' repeat state added in the previous commit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
HoneyandClaude Sonnet 4.6 committed 2026-05-23 00:31:50 +02:00
1 parent a8f56a9bc6
commit 6894e8a94a
3 files changed
+30 -7

No files matched your search

+1 -2
View File
@@ -298,8 +298,7 @@ button:focus{outline:none}
.ctrl-buttons{display:flex;align-items:center;gap:10px}
.ctrl-btn{background:none;border:none;color:var(--text2);cursor:pointer;padding:5px;border-radius:7px;display:flex;align-items:center;transition:color .15s}
#btn-repeat{position:relative}
#btn-repeat.repeat-one::after,#np-repeat-btn.repeat-one::after{content:'1';position:absolute;top:1px;right:1px;font-size:7px;font-weight:700;line-height:11px;text-align:center;width:11px;height:11px;border-radius:50%;background:var(--accent);color:#000;pointer-events:none}
#np-repeat-btn{position:relative}
#btn-repeat.repeat-one::after,#np-repeat-btn.repeat-one::after{content:'1';position:absolute;top:1px;right:1px;font-size:7px;font-weight:700;line-height:11px;text-align:center;width:11px;height:11px;border-radius:50%;background:var(--accent);color:#000;pointer-events:none}#np-repeat-btn{position:relative}
.ctrl-btn:hover{color:var(--text)}
.ctrl-btn.active{color:var(--accent)}
.play-pause-btn{width:38px;height:38px;border-radius:50%;background:var(--accent);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:transform .15s,background .15s;box-shadow:0 0 18px var(--accent-glow)}