Commit 979c4290 authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

feat: splash screen support

parent bcf78b4e
...@@ -47,5 +47,16 @@ ...@@ -47,5 +47,16 @@
</head> </head>
<body data-sveltekit-preload-data="hover"> <body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div> <div style="display: contents">%sveltekit.body%</div>
<div id="splash-screen" style="min-height: 100vh; height: 100dvh; display: flex">
<div style="margin: auto">
<img
src="/logo.svg"
alt="logo"
style="width: 6rem; height: 6rem; margin-bottom: 2rem"
draggable="false"
/>
</div>
</div>
</body> </body>
</html> </html>
...@@ -7,18 +7,21 @@ ...@@ -7,18 +7,21 @@
import { getBackendConfig } from '$lib/apis'; import { getBackendConfig } from '$lib/apis';
import { getSessionUser } from '$lib/apis/auths'; import { getSessionUser } from '$lib/apis/auths';
import '../app.css';
import '../tailwind.css'; import '../tailwind.css';
import '../app.css';
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);
let loaded = false; let loaded = false;
onMount(async () => { onMount(async () => {
document.getElementById('splash-screen')?.remove();
theme.set(localStorage.theme); theme.set(localStorage.theme);
// Check Backend Status // Check Backend Status
const backendConfig = await getBackendConfig(); const backendConfig = await getBackendConfig();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment