This commit is contained in:
arrelin
2026-03-10 12:16:00 +03:00
parent 0f72d62d3e
commit 6f679a5066
6 changed files with 92 additions and 50 deletions

View File

@@ -16,9 +16,20 @@ function AppContent() {
const { user, isAuthenticated, isLoading, setUser, setIsLoading } = useStore();
const location = useLocation();
const themeColors: Record<string, string> = {
light: '#667eea',
dark: '#000000',
sunset: '#f97316',
ocean: '#3b82f6',
forest: '#22c55e',
purple: '#8b5cf6',
};
useEffect(() => {
const storedTheme = localStorage.getItem('theme') || 'light';
document.documentElement.setAttribute('data-theme', storedTheme);
const metaTheme = document.querySelector('meta[name="theme-color"]');
if (metaTheme) metaTheme.setAttribute('content', themeColors[storedTheme] ?? '#667eea');
const storedLocale = localStorage.getItem('locale');
if (storedLocale && storedLocale !== i18n.language) {