50 lines
2.0 KiB
HTML
50 lines
2.0 KiB
HTML
<div class="bg-base-100 rounded-box border border-base-300 p-3 shadow-sm space-y-3">
|
|
<div class="flex flex-wrap items-center gap-3">
|
|
<div class="flex-1 min-w-0">
|
|
<div class="font-semibold truncate">{artist.name}</div>
|
|
<div class="text-xs text-base-content/60 truncate">
|
|
{#if artist.disambiguation??}{artist.disambiguation}{#else}Artist{/if}
|
|
{#if artist.areaName??}<span class="badge badge-ghost badge-xs ml-1">{artist.areaName}</span>{/if}
|
|
</div>
|
|
</div>
|
|
<button class="btn btn-ghost btn-xs text-error"
|
|
hx-delete="/artists/{artist.mbid}"
|
|
hx-target="#artist-{artist.mbid}"
|
|
hx-swap="delete"
|
|
hx-on::after-request="DiscDrop.refreshFeed()">
|
|
Unfollow
|
|
</button>
|
|
</div>
|
|
|
|
<div class="flex flex-wrap gap-2">
|
|
{#for s in settings}
|
|
<label class="label cursor-pointer gap-1 badge badge-outline py-2">
|
|
<input type="checkbox"
|
|
name="enabled"
|
|
class="checkbox checkbox-xs"
|
|
value="true"
|
|
{#if s.enabled}checked{/if}
|
|
hx-post="/artists/{artist.mbid}/types"
|
|
hx-vals='{"primaryType":"{s.primaryType}"}'
|
|
hx-include="this"
|
|
hx-target="#artist-{artist.mbid}"
|
|
hx-swap="innerHTML"
|
|
hx-on::after-request="DiscDrop.refreshFeed()"/>
|
|
<span class="text-xs">{s.primaryType}</span>
|
|
</label>
|
|
{/for}
|
|
</div>
|
|
|
|
{#if syncing?? && syncing}
|
|
<div class="flex items-center gap-2 text-sm text-base-content/60 pt-1">
|
|
<span class="loading loading-spinner loading-xs"></span>
|
|
<span>Syncing releases from MusicBrainz…</span>
|
|
</div>
|
|
<div hx-get="/artists/{artist.mbid}/row"
|
|
hx-target="#artist-{artist.mbid}"
|
|
hx-swap="innerHTML"
|
|
hx-trigger="load delay:3s"
|
|
class="hidden"></div>
|
|
{/if}
|
|
</div>
|