From 3ad313e39057234d66a400b9c9b3e5cd9f29efb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Boduro=C4=9Flu?= <80620802+burakboduroglu@users.noreply.github.com> Date: Mon, 13 Jul 2026 09:37:44 +0300 Subject: [PATCH] =?UTF-8?q?style:=20=F0=9F=92=84=20redesign=20authenticate?= =?UTF-8?q?d=20sidebar=20shell?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - move authenticated navigation into a full-height sidebar shell - add sidebar account dropdown with role label, theme, language, and logout actions - tune dark theme tokens and sidebar nav states for a denser dashboard look --- src/components/layout/app-shell.tsx | 90 ++++++++++++++++------- src/components/layout/side-nav.tsx | 13 ++-- src/components/layout/sidebar-account.tsx | 89 ++++++++++++++++++++++ src/index.css | 61 ++++++++------- 4 files changed, 195 insertions(+), 58 deletions(-) create mode 100644 src/components/layout/sidebar-account.tsx diff --git a/src/components/layout/app-shell.tsx b/src/components/layout/app-shell.tsx index 02cac6e..3b1afa3 100644 --- a/src/components/layout/app-shell.tsx +++ b/src/components/layout/app-shell.tsx @@ -1,10 +1,11 @@ import type { ParentProps } from "solid-js"; -import { useLocation } from "@tanstack/solid-router"; -import { Show } from "solid-js"; +import { Link, useLocation, useNavigate } from "@tanstack/solid-router"; +import { Show, createSignal } from "solid-js"; import { NavBar } from "@/components/layout/nav-bar"; import { SideNav } from "@/components/layout/side-nav"; +import { SidebarAccount } from "@/components/layout/sidebar-account"; import { Button } from "@/components/ui/button"; -import { IconChevronLeft, IconChevronRight } from "@/components/ui/icons"; +import { IconChevronLeft, IconChevronRight, IconMenu } from "@/components/ui/icons"; import { useAuth } from "@/stores/auth-context"; import { usePreferences, useT } from "@/stores/preferences-context"; import { cn } from "@/lib/cn"; @@ -16,68 +17,107 @@ export function AppShell(props: ParentProps) { const auth = useAuth(); const prefs = usePreferences(); const t = useT(); + const navigate = useNavigate(); + const [mobileOpen, setMobileOpen] = createSignal(false); const collapsed = () => prefs.sidebarCollapsed(); const location = useLocation(); const wide = () => location().pathname.startsWith("/exam-room/"); + const logout = async () => { + await auth.logout(); + void navigate({ to: "/login" }); + }; return ( -