feat: concerts button always visible, shows 'Keine Konzerte angekündigt' when empty
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
4bb131b219
commit
f04d87254b
3 files changed
+11
-7
No files matched your search
+5
-7
@@ -229,13 +229,11 @@ export async function loadArtistDetail(artist) {
|
||||
actionBar.appendChild(shuffleBtn);
|
||||
}
|
||||
const events = eventsRes.status === 'fulfilled' ? (eventsRes.value || []) : [];
|
||||
if(events.length) {
|
||||
const evBtn = document.createElement('button');
|
||||
evBtn.className = 'artist-action-btn';
|
||||
evBtn.innerHTML = `<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="4" width="18" height="18" rx="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg> Konzerte <span style="font-size:11px;opacity:.7">(${events.length})</span>`;
|
||||
evBtn.onclick = () => openEventsModal(events, artist.name);
|
||||
actionBar.appendChild(evBtn);
|
||||
}
|
||||
const evBtn = document.createElement('button');
|
||||
evBtn.className = 'artist-action-btn';
|
||||
evBtn.innerHTML = `<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="4" width="18" height="18" rx="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg> Konzerte${events.length ? ` <span style="font-size:11px;opacity:.7">(${events.length})</span>` : ''}`;
|
||||
evBtn.onclick = () => openEventsModal(events, artist.name);
|
||||
actionBar.appendChild(evBtn);
|
||||
}
|
||||
|
||||
if(albEl) { albEl.innerHTML = ''; _renderArtistAlbums(albEl, ndAlbums, iAlbums, artist); }
|
||||
|
||||
Reference in new issue
Block a user