From 979c4290f7c5bd32ea093099a6b16c008d0f46e0 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sat, 27 Apr 2024 18:50:26 -0400 Subject: [PATCH] feat: splash screen support --- src/app.html | 11 +++++++++++ src/routes/+layout.svelte | 7 +++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/app.html b/src/app.html index 2d1ef0d12..936fbfa6e 100644 --- a/src/app.html +++ b/src/app.html @@ -47,5 +47,16 @@
%sveltekit.body%
+ +
+
+ logo +
+
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 4af6c1b0c..f81e39597 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -7,18 +7,21 @@ import { getBackendConfig } from '$lib/apis'; import { getSessionUser } from '$lib/apis/auths'; - import '../app.css'; import '../tailwind.css'; + import '../app.css'; + import 'tippy.js/dist/tippy.css'; + import { WEBUI_BASE_URL } from '$lib/constants'; import i18n, { initI18n } from '$lib/i18n'; - import Spinner from '$lib/components/common/Spinner.svelte'; setContext('i18n', i18n); let loaded = false; onMount(async () => { + document.getElementById('splash-screen')?.remove(); + theme.set(localStorage.theme); // Check Backend Status const backendConfig = await getBackendConfig();