fix(static): fix view
This commit is contained in:
1 parent
e528b99743
commit
296ef629a8
3 files changed
+10
-16
No files matched your search
+3
-4
@@ -5,6 +5,7 @@
|
||||
const updated = document.getElementById("ymUpdated");
|
||||
const refresh = document.getElementById("ymRefresh");
|
||||
const nowBody = document.getElementById("ymNowBody");
|
||||
const nowEl = document.getElementById("ymNow");
|
||||
if (!list || !updated) return;
|
||||
|
||||
const SOURCE = "/api/listenbrainz/recent";
|
||||
@@ -75,10 +76,8 @@
|
||||
|
||||
const renderNow = (track) => {
|
||||
if (!nowBody) return;
|
||||
if (!track) {
|
||||
nowBody.innerHTML = '<span class="ym-now-idle">ничего не играет</span>';
|
||||
return;
|
||||
}
|
||||
if (nowEl) nowEl.style.display = track ? "" : "none";
|
||||
if (!track) return;
|
||||
const cover = track.cover
|
||||
? `<img class="ym-now-cover" src="${escapeHtml(track.cover)}" alt="" loading="lazy" width="72" height="72">`
|
||||
: `<span class="ym-now-cover ym-cover-empty" aria-hidden="true">♪</span>`;
|
||||
|
||||
Reference in new issue
Block a user