Merge pull request #346 from ollama-webui/default-theme-fix

fix: default theme should be dark
This commit is contained in:
Timothy Jaeryang Baek 2024-01-01 23:00:53 -05:00 committed by GitHub
commit 27aa1e964d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,12 +12,12 @@
(!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: light)').matches)
) {
document.documentElement.classList.add('light');
} else if (localStorage.theme === 'dark') {
document.documentElement.classList.add('dark');
} else {
} else if (localStorage.theme) {
localStorage.theme.split(' ').forEach((e) => {
document.documentElement.classList.add(e);
});
} else {
document.documentElement.classList.add('dark');
}
</script>