Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
979c4290
Commit
979c4290
authored
Apr 27, 2024
by
Timothy J. Baek
Browse files
feat: splash screen support
parent
bcf78b4e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
src/app.html
src/app.html
+11
-0
src/routes/+layout.svelte
src/routes/+layout.svelte
+5
-2
No files found.
src/app.html
View file @
979c4290
...
...
@@ -47,5 +47,16 @@
</head>
<body
data-sveltekit-preload-data=
"hover"
>
<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>
</html>
src/routes/+layout.svelte
View file @
979c4290
...
...
@@ -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();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment