forked from open-webui/open-webui
		
	feat: splash screen support
This commit is contained in:
		
							parent
							
								
									bcf78b4efa
								
							
						
					
					
						commit
						979c4290f7
					
				
					 2 changed files with 16 additions and 2 deletions
				
			
		
							
								
								
									
										11
									
								
								src/app.html
									
										
									
									
									
								
							
							
						
						
									
										11
									
								
								src/app.html
									
										
									
									
									
								
							|  | @ -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> | ||||
|  |  | |||
|  | @ -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(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy J. Baek
						Timothy J. Baek