Changeset 359b9ae in Klonkt for src/services


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@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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}"
Note: See TracChangeset for help on using the changeset viewer.