Fix: show sync spinner at top of feed even when feed is already populated
This commit is contained in:
@@ -1,3 +1,14 @@
|
|||||||
|
{#if syncing?? && syncing}
|
||||||
|
<div class="flex items-center justify-center gap-2 py-2 text-base-content/60">
|
||||||
|
<span class="loading loading-spinner loading-sm text-primary"></span>
|
||||||
|
<span class="text-sm">Fetching releases from MusicBrainz…</span>
|
||||||
|
</div>
|
||||||
|
<div hx-get="/feed?offset=0"
|
||||||
|
hx-target="#feed-list"
|
||||||
|
hx-swap="innerHTML"
|
||||||
|
hx-trigger="load delay:3s"
|
||||||
|
class="hidden"></div>
|
||||||
|
{/if}
|
||||||
{#for row in rows}
|
{#for row in rows}
|
||||||
{#include fragments/feed-row.html row=row /}
|
{#include fragments/feed-row.html row=row /}
|
||||||
{/for}
|
{/for}
|
||||||
@@ -10,21 +21,9 @@
|
|||||||
Load more
|
Load more
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
{#if !hasMore && rows.empty}
|
{#if !hasMore && rows.empty && !(syncing?? && syncing)}
|
||||||
{#if syncing?? && syncing}
|
|
||||||
<div class="text-center py-12">
|
|
||||||
<span class="loading loading-spinner loading-lg text-primary"></span>
|
|
||||||
<p class="mt-3 text-base-content/70">Fetching releases from MusicBrainz…</p>
|
|
||||||
</div>
|
|
||||||
<div hx-get="/feed?offset=0"
|
|
||||||
hx-target="#feed-list"
|
|
||||||
hx-swap="innerHTML"
|
|
||||||
hx-trigger="load delay:3s"
|
|
||||||
class="hidden"></div>
|
|
||||||
{#else}
|
|
||||||
<div class="text-center text-base-content/60 py-12">
|
<div class="text-center text-base-content/60 py-12">
|
||||||
<p class="text-lg">No releases yet.</p>
|
<p class="text-lg">No releases yet.</p>
|
||||||
<p class="text-sm">Search for an artist above and click <strong>Follow</strong> to start tracking their release groups.</p>
|
<p class="text-sm">Search for an artist above and click <strong>Follow</strong> to start tracking their release groups.</p>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user