Skip to content

Commit 704d07e

Browse files
committed
refac
1 parent bc8d24c commit 704d07e

1 file changed

Lines changed: 1 addition & 29 deletions

File tree

src/lib/components/OnBoarding.svelte

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,12 @@
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;
@@ -71,7 +43,7 @@
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
/>

0 commit comments

Comments
 (0)