fix: smooth NP swipe-open animation; live playing highlight in song lists
Swipe animation: - _resetDrag(true) now reads the overlay's current drag position and starts the CSS transition from there instead of resetting to translateY(100%) first. That reset was causing the visible stutter (overlay jumped off-screen then slid back up). Now the overlay continues seamlessly from wherever the finger released to translateY(0). Playing highlight: - makeSongItem: adds data-song-id attribute to every .song-item element. - updatePlayerUI: calls _updatePlayingHighlights() after every track change. This toggles .playing on all visible song items in any open list/playlist/ favorites view so the highlighted row always matches what's actually playing, without requiring the user to navigate away and back. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
0fbb1385f1
commit
b0fb1b200d
3 files changed
+32
-2
No files matched your search
@@ -31,6 +31,7 @@ export function makeSongItem(s, idx, list, { noArtistLink = false, noAlbumLink =
|
||||
const el = document.createElement('div');
|
||||
if(s.starred && !s._starred) s._starred = true;
|
||||
el.className = 'song-item' + (S.queue[S.qIdx]?.id === s.id ? ' playing' : '');
|
||||
el.dataset.songId = s.id;
|
||||
const cv = coverUrl(s.coverArt, 128);
|
||||
const artistParts = (s.artist || '').split(/\s*(?:\/|•|,)\s*/).filter(Boolean);
|
||||
const artistHtml = artistParts.length
|
||||
|
||||
Reference in new issue
Block a user