From fde97af90a50ae6bde8fbbeffb3ce539579222e6 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Sun, 27 Aug 2023 01:35:20 -0700
Subject: feat(list): loading ui changes

---
 src/lib/List/Due/MangaList.svelte | 30 +++++++++++++++++-------------
 1 file changed, 17 insertions(+), 13 deletions(-)

(limited to 'src/lib/List/Due/MangaList.svelte')

diff --git a/src/lib/List/Due/MangaList.svelte b/src/lib/List/Due/MangaList.svelte
index 7c7a285d..8f30772f 100644
--- a/src/lib/List/Due/MangaList.svelte
+++ b/src/lib/List/Due/MangaList.svelte
@@ -79,19 +79,21 @@
 </script>
 
 {#await mangaLists}
-	<summary>Manga</summary>
+	<summary>Manga [...] <small style="opacity: 50%">...s</small></summary>
 
 	<ul><li>Loading ...</li></ul>
 {:then media}
-	<summary>
-		Manga {#await cleanMedia(media, displayUnresolved) then count}[{count.length}]{/await}
-		<small style="opacity: 50%">{endTime / 1000}s</small>
-	</summary>
-
-	<ul>
-		{#await cleanMedia(media, displayUnresolved)}
-			<li>Loading ...</li>
-		{:then cleanedMedia}
+	{#await cleanMedia(media, displayUnresolved)}
+		<summary>Manga</summary>
+
+		<ul><li>Loading ...</li></ul>
+	{:then cleanedMedia}
+		<summary>
+			Manga [{cleanedMedia.length}]
+			<small style="opacity: 50%">{endTime / 1000}s</small>
+		</summary>
+
+		<ul>
 			{#each cleanedMedia as manga}
 				<li>
 					<a href={`https://anilist.co/manga/${manga['id']}`} target="_blank">
@@ -102,12 +104,14 @@
 					[{manga['episodes'] || '?'}]
 				</li>
 			{/each}
-		{:catch}
+		</ul>
+	{:catch}
+		<ul>
 			<li>
 				Media could not be loaded. You might have been <a
 					href="https://en.wikipedia.org/wiki/Rate_limiting">rate limited</a
 				>.
 			</li>
-		{/await}
-	</ul>
+		</ul>
+	{/await}
 {/await}
-- 
cgit v1.2.3

