diff --git a/ui/desktop/index.html b/ui/desktop/index.html index 78a85db070c2..6547abc5d63f 100644 --- a/ui/desktop/index.html +++ b/ui/desktop/index.html @@ -13,13 +13,18 @@ const useSystemTheme = localStorage.getItem('use_system_theme') === 'true'; const systemPrefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches; const savedTheme = localStorage.getItem('theme'); - const isDark = useSystemTheme ? systemPrefersDark : (savedTheme ? savedTheme === 'dark' : systemPrefersDark); + const isGlass = !useSystemTheme && savedTheme === 'glass'; + const isDark = useSystemTheme ? systemPrefersDark : (savedTheme ? savedTheme === 'dark' || savedTheme === 'glass' : systemPrefersDark); - if (isDark) { + if (isGlass) { + document.documentElement.classList.add('dark', 'glass'); + document.documentElement.style.colorScheme = 'dark'; + } else if (isDark) { document.documentElement.classList.add('dark'); + document.documentElement.classList.remove('glass'); document.documentElement.style.colorScheme = 'dark'; } else { - document.documentElement.classList.remove('dark'); + document.documentElement.classList.remove('dark', 'glass'); document.documentElement.style.colorScheme = 'light'; } } else { diff --git a/ui/desktop/src/components/GooseSidebar/ThemeSelector.tsx b/ui/desktop/src/components/GooseSidebar/ThemeSelector.tsx index f3783bd753e9..6a1770432a17 100644 --- a/ui/desktop/src/components/GooseSidebar/ThemeSelector.tsx +++ b/ui/desktop/src/components/GooseSidebar/ThemeSelector.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Moon, Sliders, Sun } from 'lucide-react'; +import { Layers, Moon, Sliders, Sun } from 'lucide-react'; import { Button } from '../ui/button'; import { useTheme } from '../../contexts/ThemeContext'; @@ -20,7 +20,7 @@ const ThemeSelector: React.FC = ({
{!hideTitle &&
Theme
}
+ + +