File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 import { getContext } from ' svelte' ;
33 const i18n = getContext (' i18n' );
44
5- import { WEBUI_BASE_URL } from ' $lib/constants' ;
6-
75 export let show = true ;
86 export let getStartedHandler = () => {};
97
108 let videoElement;
119 let playOnInteractionRegistered = false ;
1210
13- function setLogoImage () {
14- const logo = document .getElementById (' logo' );
15-
16- if (logo) {
17- const isDarkMode = document .documentElement .classList .contains (' dark' );
18-
19- if (isDarkMode) {
20- const darkImage = new Image ();
21- darkImage .src = ` ${ WEBUI_BASE_URL } /static/favicon-dark.png` ;
22-
23- darkImage .onload = () => {
24- logo .src = ` ${ WEBUI_BASE_URL } /static/favicon-dark.png` ;
25- logo .style .filter = ' ' ; // Ensure no inversion is applied if splash-dark.png exists
26- };
27-
28- darkImage .onerror = () => {
29- logo .style .filter = ' invert(1)' ; // Invert image if splash-dark.png is missing
30- };
31- }
32- }
33- }
34-
35- $: if (show) {
36- setLogoImage ();
37- }
38-
3911 function playBackgroundVideo () {
4012 if (! videoElement) {
4113 return ;
7143 <img
7244 id =" logo"
7345 crossorigin =" anonymous"
74- src =" { WEBUI_BASE_URL } /static/favicon.png"
46+ src =" /static/favicon.png"
7547 class =" size-6 rounded-full"
7648 alt =" logo"
7749 />
You can’t perform that action at this time.
0 commit comments