diff --git a/web/src/routes/admin/+page.svelte b/web/src/routes/admin/+page.svelte index 7f04dfbf..acec5dec 100644 --- a/web/src/routes/admin/+page.svelte +++ b/web/src/routes/admin/+page.svelte @@ -56,6 +56,12 @@ const quarantineCount = $derived(quarantine.data?.length ?? 0); const lidarrConnected = $derived(config.data?.enabled === true); + // A tile whose query failed shows a dash, not 0: a failed load must not + // read as an all-clear (#5604). + function tile(q: { isPending: boolean; isError: boolean }, n: number): string { + return q.isPending || q.isError ? '—' : String(n); + } + const requestPreview = $derived( (requests.data ?? []).slice(0, PREVIEW_LIMIT) ); @@ -110,6 +116,9 @@ // ---- Action handlers ---- async function invalidateRequests() { await Promise.all([ + // An approved request becomes a want, so the Collection's lists and + // counts change too (#5604). + client.invalidateQueries({ queryKey: ['adminWants'] }), client.invalidateQueries({ queryKey: qk.adminRequests('pending') }), client.invalidateQueries({ queryKey: qk.adminRequests('approved') }), client.invalidateQueries({ queryKey: qk.adminRequests('rejected') }), @@ -265,14 +274,14 @@ class="block rounded-xl border border-border bg-surface p-5 transition-colors hover:bg-surface-hover" >
Loading…
+ {:else if requests.isError} ++ Couldn't load the requests. + +
{:else if requestPreview.length === 0}No pending requests.
{:else} @@ -529,6 +543,11 @@ {#if quarantine.isPending}Loading…
+ {:else if quarantine.isError} ++ Couldn't load the quarantine. + +
{:else if quarantinePreview.length === 0}No quarantined tracks.
{:else} @@ -568,6 +587,9 @@ >- Route approved requests from /discover - to Lidarr. Search itself now asks MusicBrainz. + Optional. Approved requests go on Minstrel's own wanted list; a connected Lidarr is + still used to search for a cleaner copy of a suspect album, to remove an album through + it, and to stop monitoring tracks you remove.
Loading…
+ {:else if coverProvidersQ.isError} ++ Couldn't load the cover art providers. + +
{:else}No providers registered.
{/if} @@ -752,6 +770,11 @@ {/each} {:else if tagProvidersQ.isPending}Loading…
+ {:else if tagProvidersQ.isError} ++ Couldn't load the tag providers. + +
{:else}No providers registered.
{/if} @@ -766,6 +789,13 @@ + {#if smtpQ.isError && !smtpLoaded} ++ Couldn't load the email settings, so they can't be saved yet. + +
+ {/if} +