diff --git a/web/src/app.html b/web/src/app.html index 6a2bb58..2571249 100644 --- a/web/src/app.html +++ b/web/src/app.html @@ -1,9 +1,21 @@ - + + %sveltekit.head% diff --git a/web/src/lib/AppShell.svelte b/web/src/lib/AppShell.svelte index 9115c8f..f826e85 100644 --- a/web/src/lib/AppShell.svelte +++ b/web/src/lib/AppShell.svelte @@ -2,9 +2,19 @@ import { resolve } from '$app/paths'; import { page } from '$app/state'; import { cn } from '$lib/utils.js'; + import { Button } from '$lib/components/ui/button/index.js'; import { buttonVariants } from '$lib/components/ui/button/button.svelte'; + import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuLabel, + DropdownMenuRadioGroup, + DropdownMenuRadioItem, + DropdownMenuTrigger + } from '$lib/components/ui/dropdown-menu/index.js'; import { Separator } from '$lib/components/ui/separator/index.js'; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '$lib/components/ui/tooltip/index.js'; + import type { ThemePreference } from '$lib/theme.js'; import Activity from '@lucide/svelte/icons/activity'; import Boxes from '@lucide/svelte/icons/boxes'; @@ -17,6 +27,9 @@ import CalendarClock from '@lucide/svelte/icons/calendar-clock'; import PanelLeftClose from '@lucide/svelte/icons/panel-left-close'; import PanelLeftOpen from '@lucide/svelte/icons/panel-left-open'; + import Sun from '@lucide/svelte/icons/sun'; + import Moon from '@lucide/svelte/icons/moon'; + import Monitor from '@lucide/svelte/icons/monitor'; const nav = [ { href: '/', label: 'Обзор', icon: LayoutDashboard }, @@ -34,7 +47,7 @@ ] as const; let collapsed = $state(false); - let { children } = $props(); + let { children, theme = $bindable('system') } = $props(); function isActive(href: string) { const pathname = page.url.pathname; @@ -60,6 +73,37 @@

Control plane

{/if} + + + + + + + + Тема + + + + Светлая + + + + Тёмная + + + + Как в системе + + + +