Fix UI: replace Tailwind classes with inline styles for CDN compatibility

This commit is contained in:
2026-07-03 11:04:41 +02:00
parent 16f23557f0
commit d66b6e884f
5 changed files with 77 additions and 87 deletions
@@ -1,84 +1,84 @@
<div id="artist-list" hx-swap-oob="true">
{#if artists.isEmpty()}
<div class="card bg-base-100 shadow-xl p-10 text-center border border-base-300">
<svg class="w-12 h-12 mx-auto text-base-content/20 mb-3" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
<div class="bg-base-100 shadow-xl rounded-box p-10 text-center border border-base-300">
<svg class="icon-lg" style="margin:0 auto 0.75rem;color:var(--bc);opacity:0.15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/>
</svg>
<p class="text-lg font-medium text-base-content/60">No artists tracked yet</p>
<p class="text-sm text-base-content/40 mt-1">Search for artists using the search bar above and click <span class="font-semibold text-primary">+ Add</span></p>
<p style="font-size:1.125rem;font-weight:500;color:var(--bc);opacity:0.6">No artists tracked yet</p>
<p style="font-size:0.875rem;color:var(--bc);opacity:0.4;margin-top:0.25rem">Search for artists using the search bar above</p>
</div>
{#else}
<div class="overflow-x-auto rounded-box border border-base-300">
<table class="table table-pin-rows">
<thead>
<tr class="bg-base-200/80">
<tr style="background:color-mix(in srgb, var(--b2) 80%, transparent)">
<th>Artist</th>
<th>Since</th>
<th>Release Types</th>
<th class="w-24">Actions</th>
<th style="width:6rem">Actions</th>
</tr>
</thead>
<tbody>
{#for artist in artists}
<tr class="hover:bg-base-200/50 transition-colors">
<tr style="transition:background 0.15s" onmouseover="this.style.background='color-mix(in srgb, var(--b2) 50%, transparent)'" onmouseout="this.style.background=''">
<td>
<div class="font-medium">{artist.name}</div>
<div style="font-weight:500">{artist.name}</div>
{#if artist.disambiguation}
<div class="text-xs text-base-content/50">{artist.disambiguation}</div>
<div style="font-size:0.75rem;color:var(--bc);opacity:0.5">{artist.disambiguation}</div>
{/if}
</td>
<td class="text-sm text-base-content/50">{artist.createdAt}</td>
<td style="font-size:0.875rem;color:var(--bc);opacity:0.5">{artist.createdAt}</td>
<td>
<div class="flex flex-wrap gap-1.5">
<label class="label cursor-pointer gap-1.5 p-1">
<div style="display:flex;flex-wrap:wrap;gap:0.375rem">
<label class="label cursor-pointer gap-1 p-1">
<input type="checkbox" class="checkbox checkbox-xs checkbox-primary"
{#if artist.albumMonitored}checked{/if}
hx-patch="/api/artists/{artist.mbid}/monitor?type=album"
hx-target="#artist-list"
hx-swap="innerHTML">
<span class="label-text text-xs font-medium text-primary">Album</span>
<span class="label-text text-xs" style="color:var(--p)">Album</span>
</label>
<label class="label cursor-pointer gap-1.5 p-1">
<label class="label cursor-pointer gap-1 p-1">
<input type="checkbox" class="checkbox checkbox-xs checkbox-secondary"
{#if artist.singleMonitored}checked{/if}
hx-patch="/api/artists/{artist.mbid}/monitor?type=single"
hx-target="#artist-list"
hx-swap="innerHTML">
<span class="label-text text-xs font-medium text-secondary">Single</span>
<span class="label-text text-xs" style="color:var(--s)">Single</span>
</label>
<label class="label cursor-pointer gap-1.5 p-1">
<label class="label cursor-pointer gap-1 p-1">
<input type="checkbox" class="checkbox checkbox-xs checkbox-accent"
{#if artist.epMonitored}checked{/if}
hx-patch="/api/artists/{artist.mbid}/monitor?type=ep"
hx-target="#artist-list"
hx-swap="innerHTML">
<span class="label-text text-xs font-medium text-accent">EP</span>
<span class="label-text text-xs" style="color:var(--a)">EP</span>
</label>
<label class="label cursor-pointer gap-1.5 p-1">
<label class="label cursor-pointer gap-1 p-1">
<input type="checkbox" class="checkbox checkbox-xs"
{#if artist.broadcastMonitored}checked{/if}
hx-patch="/api/artists/{artist.mbid}/monitor?type=broadcast"
hx-target="#artist-list"
hx-swap="innerHTML">
<span class="label-text text-xs text-base-content/60">Broadcast</span>
<span class="label-text text-xs" style="color:var(--bc);opacity:0.6">Broadcast</span>
</label>
<label class="label cursor-pointer gap-1.5 p-1">
<label class="label cursor-pointer gap-1 p-1">
<input type="checkbox" class="checkbox checkbox-xs"
{#if artist.otherMonitored}checked{/if}
hx-patch="/api/artists/{artist.mbid}/monitor?type=other"
hx-target="#artist-list"
hx-swap="innerHTML">
<span class="label-text text-xs text-base-content/60">Other</span>
<span class="label-text text-xs" style="color:var(--bc);opacity:0.6">Other</span>
</label>
</div>
</td>
<td>
<button class="btn btn-ghost btn-xs text-error hover:bg-error/10"
<button class="btn btn-ghost btn-xs" style="color:var(--er)"
hx-delete="/api/artists/{artist.mbid}"
hx-target="#artist-list"
hx-swap="innerHTML"
onclick="return confirm('Remove {artist.name}?')">
<svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"/></svg>
<svg class="icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"/></svg>
Remove
</button>
</td>
@@ -1,45 +1,35 @@
{#if entries.isEmpty()}
<div class="card bg-base-100 shadow-xl p-10 text-center">
<svg class="w-12 h-12 mx-auto text-base-content/20 mb-3" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
<div class="bg-base-100 shadow-xl rounded-box p-10 text-center border border-base-300">
<svg class="icon-lg" style="margin:0 auto 0.75rem;color:var(--bc);opacity:0.15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
<circle cx="6" cy="18" r="3"/><circle cx="18" cy="16" r="3"/>
<path d="M9 18V5l12-2v13"/><path d="M9 9l12-2"/>
</svg>
<p class="text-lg font-medium text-base-content/60">No releases found</p>
<p class="text-sm text-base-content/40 mt-1">Add artists to your collection to see their releases here</p>
<p style="font-size:1.125rem;font-weight:500;color:var(--bc);opacity:0.6">No releases found</p>
<p style="font-size:0.875rem;color:var(--bc);opacity:0.4;margin-top:0.25rem">Add artists to your collection to see their releases here</p>
</div>
{#else}
<div class="overflow-x-auto rounded-box border border-base-300">
<table class="table table-pin-rows">
<thead>
<tr class="bg-base-200/80">
<th class="w-20">Cover</th>
<tr style="background:color-mix(in srgb, var(--b2) 80%, transparent)">
<th style="width:5rem">Cover</th>
<th>Artist</th>
<th>Release</th>
<th>Type</th>
<th class="w-28">Date</th>
<th style="width:7rem">Date</th>
</tr>
</thead>
<tbody>
{#for entry in entries}
<tr class="hover:bg-base-200/50 transition-colors">
<tr style="transition:background 0.15s" onmouseover="this.style.background='color-mix(in srgb, var(--b2) 50%, transparent)'" onmouseout="this.style.background=''">
<td>
<a href="https://musicbrainz.org/release-group/{entry.mbid}"
target="_blank" rel="noopener noreferrer">
<img src="https://coverartarchive.org/release-group/{entry.mbid}/front-250"
alt="Cover"
width="64" height="64"
style="width:64px;height:64px;object-fit:cover;border-radius:8px"
loading="lazy"
onerror="this.style.display='none'">
<a href="https://musicbrainz.org/release-group/{entry.mbid}" target="_blank" rel="noopener noreferrer">
<img src="https://coverartarchive.org/release-group/{entry.mbid}/front-250" alt="Cover" class="cover-img" loading="lazy" onerror="this.style.display='none'">
</a>
</td>
<td><span style="font-weight:500">{entry.artistName}</span></td>
<td>
<span class="font-medium">{entry.artistName}</span>
</td>
<td>
<a href="https://musicbrainz.org/release-group/{entry.mbid}"
target="_blank" rel="noopener noreferrer"
class="link link-hover font-medium">
<a href="https://musicbrainz.org/release-group/{entry.mbid}" target="_blank" rel="noopener noreferrer" class="link link-hover" style="font-weight:500">
{entry.title}
</a>
</td>
@@ -54,7 +44,7 @@
<span class="badge badge-ghost badge-sm">{entry.primaryType}</span>
{/if}
</td>
<td class="text-sm text-base-content/50">{entry.firstReleaseDate}</td>
<td style="font-size:0.875rem;color:var(--bc);opacity:0.5">{entry.firstReleaseDate}</td>
</tr>
{/for}
</tbody>
@@ -1,27 +1,27 @@
<div class="card bg-base-100 shadow-xl border border-base-300 mt-1 max-h-72 overflow-y-auto">
<div class="bg-base-100 shadow-xl border border-base-300 rounded-box mt-1" style="max-height:18rem;overflow-y:auto">
{#if artists.isEmpty()}
<div class="p-4 text-sm text-base-content/50 text-center">No artists found</div>
<div class="p-4 text-sm text-center" style="color:var(--bc);opacity:0.5">No artists found</div>
{#else}
{#for artist in artists}
<div class="flex items-center justify-between p-3 hover:bg-primary/10 transition-colors border-b border-base-200 last:border-b-0">
<div class="search-dropdown-item p-3 border-b border-base-200" style="display:flex;align-items:center;justify-content:space-between">
<div class="flex-1 min-w-0 mr-2">
<div class="flex items-center gap-2">
<span class="font-semibold text-sm">{artist.name}</span>
<div style="display:flex;align-items:center;gap:0.5rem">
<span style="font-weight:600;font-size:0.875rem">{artist.name}</span>
{#if artist.type}
<span class="badge badge-ghost badge-xs">{artist.type}</span>
{/if}
</div>
{#if artist.disambiguation}
<div class="text-xs text-base-content/50 truncate">{artist.disambiguation}</div>
<div style="font-size:0.75rem;color:var(--bc);opacity:0.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">{artist.disambiguation}</div>
{/if}
{#if artist.area}
<div class="text-xs text-base-content/40">{artist.area}</div>
<div style="font-size:0.75rem;color:var(--bc);opacity:0.4">{artist.area}</div>
{/if}
</div>
<div class="flex-shrink-0">
<div style="flex-shrink:0">
{#if artist.alreadyTracked}
<span class="badge badge-success badge-sm gap-1">
<svg class="w-3 h-3" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3"><polyline points="20 6 9 17 4 12"/></svg>
<svg class="icon-xs" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3"><polyline points="20 6 9 17 4 12"/></svg>
Added
</span>
{#else}
@@ -30,7 +30,7 @@
hx-target="#search-results"
hx-swap="innerHTML"
onclick="document.getElementById('search-input').value=''">
<svg class="w-3 h-3" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
<svg class="icon-xs" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
Add
</button>
{/if}