fix: add placeholder thumbnail for history items without images

This commit is contained in:
JohnBaumb 2026-04-23 11:39:26 -07:00
parent 92077c9117
commit 038a0189a4
2 changed files with 17 additions and 3 deletions

View file

@ -2881,10 +2881,10 @@ function _adlRenderBatchHistory() {
const dotTip = dotSource ? `Source: ${dotSource}` : 'Unknown source';
const histDot = `<span class="adl-batch-history-dot" style="background:rgba(${dotColor}, 0.6)" title="${dotTip}"></span>`;
// Optional thumbnail
// Thumbnail with placeholder fallback
const thumb = h.thumb_url
? `<img src="${_adlEsc(h.thumb_url)}" class="adl-batch-history-thumb" loading="lazy">`
: '';
? `<img src="${_adlEsc(h.thumb_url)}" class="adl-batch-history-thumb" loading="lazy" onerror="this.classList.add('adl-batch-history-thumb-placeholder');this.removeAttribute('src')">`
: `<span class="adl-batch-history-thumb adl-batch-history-thumb-placeholder"></span>`;
// Server push status indicator
let pushBadge = '';

View file

@ -57200,6 +57200,20 @@ body.reduce-effects *::after {
flex-shrink: 0;
}
.adl-batch-history-thumb-placeholder {
display: inline-flex;
align-items: center;
justify-content: center;
background: rgba(255, 255, 255, 0.06);
border: 1px solid rgba(255, 255, 255, 0.06);
}
.adl-batch-history-thumb-placeholder::after {
content: '♫';
font-size: 12px;
color: rgba(255, 255, 255, 0.2);
}
.adl-batch-history-content {
flex: 1;
min-width: 0;