This commit is contained in:
Timothy Jaeryang Baek
2026-07-20 22:27:09 -04:00
parent 49e57f4e7e
commit 6940297486
2 changed files with 1 additions and 25 deletions

View File

@@ -4,7 +4,7 @@
import { toast } from 'svelte-sonner';
import { onMount, getContext, tick } from 'svelte';
import { onMount, getContext } from 'svelte';
import { goto } from '$app/navigation';
import { page } from '$app/stores';
@@ -142,29 +142,6 @@
let onboarding = false;
async function setLogoImage() {
await tick();
const logo = document.getElementById('logo');
if (logo) {
const isDarkMode = document.documentElement.classList.contains('dark');
if (isDarkMode) {
const darkImage = new Image();
darkImage.src = `${WEBUI_BASE_URL}/static/favicon-dark.png`;
darkImage.onload = () => {
logo.src = `${WEBUI_BASE_URL}/static/favicon-dark.png`;
logo.style.filter = ''; // Ensure no inversion is applied if favicon-dark.png exists
};
darkImage.onerror = () => {
logo.style.filter = 'invert(1)'; // Invert image if favicon-dark.png is missing
};
}
}
}
onMount(async () => {
const redirectPath = $page.url.searchParams.get('redirect');
if ($user) {
@@ -205,7 +182,6 @@
}
loaded = true;
setLogoImage();
if (($config?.features?.auth_trusted_header ?? false) || $config?.features?.auth === false) {
await signInHandler();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB