Changeset 359b9ae in Klonkt


Ignore:
Timestamp:
06/20/2026 02:09:51 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
ddf549f
Parents:
85d5972
Message:

fix(player): scroll-to-track also from album & playlist

Album track JSON was not passing id (posts.js) and album/playlist rows had
no anchor. Now: id in the album track data + id="track-<id>" on album and
playlist rows (playlist already had the id via PlaylistService). Highlight
flash also on playlist rows. style.css?v=17.

Co-Authored-By: Claude <noreply@…>

Location:
src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/assets/css/style.css

    r85d5972 r359b9ae  
    28212821}
    28222822/* Korte highlight wanneer je via de mini-speler naar deze track springt. */
    2823 .post-audio-track.pat-flash {
     2823.post-audio-track.pat-flash,
     2824.post-album-track-compact.pat-flash {
    28242825    animation: patFlash 1.6s ease-out;
     2826    border-radius: 8px;
    28252827}
    28262828@keyframes patFlash {
  • src/routes/posts.js

    r85d5972 r359b9ae  
    562562        if (!byAlbum.has(r.album)) byAlbum.set(r.album, []);
    563563        byAlbum.get(r.album).push({
     564          id: r.id,
    564565          url: audioUrl(r.filename),
    565566          title: r.title || 'Untitled',
  • src/services/AudioEmbedService.js

    r85d5972 r359b9ae  
    298298        const tArtist = this.escape(t.artist || '');
    299299        const tUrl = this.escape(t.url);
    300         return `    <li class="post-audio-track" data-pcms-track-url="${tUrl}" data-pcms-album-id="${albumDomId}">
     300        return `    <li class="post-audio-track"${t.id ? ` id="track-${t.id}" data-pcms-track-id="${t.id}"` : ''} data-pcms-track-url="${tUrl}" data-pcms-album-id="${albumDomId}">
    301301      <button type="button" class="pat-play" aria-label="Play ${tTitle}">
    302302        <svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M8 4l12 8-12 8z"/></svg>
     
    414414
    415415        const trackBase = String(t.url).split('?')[0];
    416         return `    <li class="post-album-track-compact">
     416        return `    <li class="post-album-track-compact"${t.id ? ` id="track-${t.id}" data-pcms-track-id="${t.id}"` : ''}>
    417417      <button type="button" class="pat-row"
    418418              data-pcms-track-url="${tUrl}"
  • src/views/shell.ejs

    r85d5972 r359b9ae  
    163163
    164164<!-- v9 stylesheet (full palette system) -->
    165 <link rel="stylesheet" href="/assets/css/style.css?v=16">
     165<link rel="stylesheet" href="/assets/css/style.css?v=17">
    166166
    167167<!-- Audio player styles: loaded on every page so the mini-player works
Note: See TracChangeset for help on using the changeset viewer.