Monitoring checkboxes target #feed-entries directly for instant refresh

This commit is contained in:
2026-07-06 16:00:02 +02:00
parent 3677d55183
commit ab9e686b9f
2 changed files with 13 additions and 11 deletions
@@ -1,4 +1,4 @@
<div id="artist-list" hx-swap-oob="true">
<div id="artist-list">
{#if artists.isEmpty()}
<div class="bg-base-200" style="border:1px solid var(--fallback-b3,oklch(var(--b3)/1));border-radius:0.5rem;padding:2.5rem;text-align:center">
<svg class="icon-lg text-base-content/20" style="margin:0 auto 0.75rem" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
@@ -34,7 +34,7 @@
<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-target="#feed-entries"
hx-swap="innerHTML">
<span class="label-text text-xs" style="color:var(--p)">Album</span>
</label>
@@ -42,7 +42,7 @@
<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-target="#feed-entries"
hx-swap="innerHTML">
<span class="label-text text-xs" style="color:var(--s)">Single</span>
</label>
@@ -50,7 +50,7 @@
<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-target="#feed-entries"
hx-swap="innerHTML">
<span class="label-text text-xs" style="color:var(--a)">EP</span>
</label>
@@ -58,7 +58,7 @@
<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-target="#feed-entries"
hx-swap="innerHTML">
<span class="label-text text-xs text-base-content/60">Broadcast</span>
</label>
@@ -66,7 +66,7 @@
<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-target="#feed-entries"
hx-swap="innerHTML">
<span class="label-text text-xs text-base-content/60">Other</span>
</label>