From d297c6310a6a4db8dd7cc3efe6ff59620deadcc0 Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Sat, 13 Jul 2024 17:29:33 +0200 Subject: frontend/reader: Show loading indicators Sometimes images may not load fast enough, resulting in the app being seemingly stuck displaying the same sets of images. Use a timeout to detect when images take too long to load and show a spinner instead. --- frontend/src/lib/reader/Reader.svelte | 2 +- frontend/src/lib/reader/ReaderPage.svelte | 35 ++++++++++++++++++++++++++++--- 2 files changed, 33 insertions(+), 4 deletions(-) (limited to 'frontend/src/lib/reader') diff --git a/frontend/src/lib/reader/Reader.svelte b/frontend/src/lib/reader/Reader.svelte index 0b1450a..a8f9440 100644 --- a/frontend/src/lib/reader/Reader.svelte +++ b/frontend/src/lib/reader/Reader.svelte @@ -24,7 +24,7 @@ {/if}
-
+
{#if $$slots.sidebar} {/if} diff --git a/frontend/src/lib/reader/ReaderPage.svelte b/frontend/src/lib/reader/ReaderPage.svelte index fb3e780..c86414d 100644 --- a/frontend/src/lib/reader/ReaderPage.svelte +++ b/frontend/src/lib/reader/ReaderPage.svelte @@ -1,19 +1,48 @@ -
+
+
+ {#if loading} + + {/if} +
{page.path}
-- cgit v1.2.3-2-gb3c3