Changeset a66f691 in Klonkt for src/services/AudioEmbedService.js


Ignore:
Timestamp:
06/20/2026 05:43:49 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
903f10b
Parents:
d727e92
Message:

fix(audio): link-only track shows cover (instead of music note)

A track without audio that has a cover set now shows the artwork as thumbnail;
the music note is only the fallback when there is no cover. buster audio.css?v=10.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/services/AudioEmbedService.js

    rd727e92 ra66f691  
    276276      // Link-only track (geen audiobestand): geen afspeelknop, wel info + open-in.
    277277      if (!t.url) {
     278        const coverH0 = this.escape(t.cover || '');
     279        const leader0 = coverH0
     280          ? `<span class="pat-noplay pat-noplay--cover" style="background-image:url('${coverH0}')" aria-hidden="true"></span>`
     281          : `<span class="pat-noplay" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18V5l12-2v13"/><circle cx="6" cy="18" r="3"/><circle cx="18" cy="16" r="3"/></svg></span>`;
    278282        return `<div class="post-audio-track post-audio-track--static" id="track-${id}">
    279   <span class="pat-noplay" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18V5l12-2v13"/><circle cx="6" cy="18" r="3"/><circle cx="18" cy="16" r="3"/></svg></span>
     283  ${leader0}
    280284  <div class="pat-info">
    281285    <div class="pat-title">${titleH0}</div>
Note: See TracChangeset for help on using the changeset viewer.