fix: add placeholder thumbnail for history items without images
This commit is contained in:
parent
92077c9117
commit
038a0189a4
2 changed files with 17 additions and 3 deletions
|
|
@ -2881,10 +2881,10 @@ function _adlRenderBatchHistory() {
|
||||||
const dotTip = dotSource ? `Source: ${dotSource}` : 'Unknown source';
|
const dotTip = dotSource ? `Source: ${dotSource}` : 'Unknown source';
|
||||||
const histDot = `<span class="adl-batch-history-dot" style="background:rgba(${dotColor}, 0.6)" title="${dotTip}"></span>`;
|
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
|
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
|
// Server push status indicator
|
||||||
let pushBadge = '';
|
let pushBadge = '';
|
||||||
|
|
|
||||||
|
|
@ -57200,6 +57200,20 @@ body.reduce-effects *::after {
|
||||||
flex-shrink: 0;
|
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 {
|
.adl-batch-history-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue