Browse Source

feat: loading indicator

Timothy J. Baek 1 year ago
parent
commit
f63866b72a
1 changed files with 12 additions and 0 deletions
  1. 12 0
      src/routes/+layout.svelte

+ 12 - 0
src/routes/+layout.svelte

@@ -12,6 +12,7 @@
 	import 'tippy.js/dist/tippy.css';
 	import 'tippy.js/dist/tippy.css';
 	import { WEBUI_BASE_URL } from '$lib/constants';
 	import { WEBUI_BASE_URL } from '$lib/constants';
 	import i18n, { initI18n } from '$lib/i18n';
 	import i18n, { initI18n } from '$lib/i18n';
+	import Spinner from '$lib/components/common/Spinner.svelte';
 
 
 	setContext('i18n', i18n);
 	setContext('i18n', i18n);
 
 
@@ -74,6 +75,17 @@
 
 
 {#if loaded}
 {#if loaded}
 	<slot />
 	<slot />
+{:else}
+	<div class=" min-h-screen h-[100dvh] flex">
+		<div class="m-auto">
+			<img
+				src="/logo.svg"
+				alt="logo"
+				class=" size-24 rounded-full border-[1px] border-gray-200 dark:border-none mx-auto mb-8"
+				draggable="false"
+			/>
+		</div>
+	</div>
 {/if}
 {/if}
 
 
 <Toaster richColors position="top-center" />
 <Toaster richColors position="top-center" />