diff --git a/bun.lockb b/bun.lockb deleted file mode 100755 index 8ec2709..0000000 Binary files a/bun.lockb and /dev/null differ diff --git a/package.json b/package.json index 1b6328d..d38f592 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "@prisma/client": "^5.21.1", "@radix-ui/react-alert-dialog": "^1.1.2", "@radix-ui/react-checkbox": "^1.1.2", + "@radix-ui/react-collapsible": "^1.1.1", "@radix-ui/react-dialog": "^1.1.2", "@radix-ui/react-dropdown-menu": "^2.1.2", "@radix-ui/react-hover-card": "^1.1.2", @@ -29,22 +30,23 @@ "@radix-ui/react-popover": "^1.1.2", "@radix-ui/react-scroll-area": "^1.2.0", "@radix-ui/react-select": "^2.1.2", + "@radix-ui/react-separator": "^1.1.0", "@radix-ui/react-slot": "^1.1.0", "@radix-ui/react-tabs": "^1.1.1", - "@radix-ui/react-tooltip": "^1.1.3", + "@radix-ui/react-tooltip": "^1.1.4", "@tanstack/react-table": "^8.20.5", "@types/bcrypt": "^5.0.2", "@types/qrcode": "^1.5.5", "@types/ws": "^8.5.13", "@xterm/xterm": "^5.5.0", "bcrypt": "^5.1.1", - "class-variance-authority": "^0.7.0", + "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cmdk": "1.0.0", "cross-env": "^7.0.3", "date-fns": "^4.1.0", "date-fns-tz": "^3.2.0", - "lucide-react": "^0.453.0", + "lucide-react": "^0.462.0", "moment": "^2.30.1", "next": "14.2.15", "next-auth": "^4.24.8", diff --git a/src/app/globals.css b/src/app/globals.css index 8f6bfe9..a935df1 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -29,6 +29,14 @@ --chart-3: 197 37% 24%; --chart-4: 43 74% 66%; --chart-5: 27 87% 67%; + --sidebar-background: 0 0% 98%; + --sidebar-foreground: 240 5.3% 26.1%; + --sidebar-primary: 240 5.9% 10%; + --sidebar-primary-foreground: 0 0% 98%; + --sidebar-accent: 240 4.8% 95.9%; + --sidebar-accent-foreground: 240 5.9% 10%; + --sidebar-border: 220 13% 91%; + --sidebar-ring: 217.2 91.2% 59.8%; } .dark { @@ -56,6 +64,14 @@ --chart-3: 30 80% 55%; --chart-4: 280 65% 60%; --chart-5: 340 75% 55%; + --sidebar-background: 240 5.9% 10%; + --sidebar-foreground: 240 4.8% 95.9%; + --sidebar-primary: 224.3 76.3% 48%; + --sidebar-primary-foreground: 0 0% 100%; + --sidebar-accent: 240 3.7% 15.9%; + --sidebar-accent-foreground: 240 4.8% 95.9%; + --sidebar-border: 240 3.7% 15.9%; + --sidebar-ring: 217.2 91.2% 59.8%; } } diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 9c92c0e..391e531 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -7,6 +7,11 @@ import { NavBar } from "./nav-bar"; import { Suspense } from "react"; import FullLoadingSpinner from "@/components/ui/full-loading-spinnter"; import { ConfirmDialog } from "@/components/custom/confirm-dialog"; +import { SidebarProvider, SidebarTrigger } from "@/components/ui/sidebar" +import { AppSidebar } from "./sidebar"; +import { cookies } from "next/headers"; +import { BreadcrumbsGenerator } from "../components/custom/breadcrumbs-generator"; +import { getUserSession } from "@/server/utils/action-wrapper.utils"; const inter = Inter({ subsets: ["latin"], @@ -18,19 +23,45 @@ export const metadata: Metadata = { description: "", // todo }; -export default function RootLayout({ +export default async function RootLayout({ children, }: Readonly<{ children: React.ReactNode; }>) { + const cookieStore = await cookies() + const defaultOpen = cookieStore.get("sidebar:state")?.value === "true"; + const session = await getUserSession(); + const userIsLoggedIn = !!session; + return (
-