mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-02-23 09:42:19 +00:00
- Updated the title and description in layout.tsx to reflect the new application name. - Replaced the background color in globals.css with a background image for the title section. - Enhanced the Devices and UserDevices pages by adding search and filter components for improved user interaction. - Introduced a new DevicesTable component for displaying device data with pagination. - Updated the Users page to improve layout and added a filter for user status. - Made various UI adjustments across components for better consistency and usability.
58 lines
1.7 KiB
TypeScript
58 lines
1.7 KiB
TypeScript
import { ModeToggle } from "@/components/theme-toggle";
|
|
import { AppSidebar } from "@/components/ui/app-sidebar";
|
|
import {
|
|
Breadcrumb,
|
|
BreadcrumbItem,
|
|
BreadcrumbLink,
|
|
BreadcrumbList,
|
|
BreadcrumbPage,
|
|
BreadcrumbSeparator,
|
|
} from "@/components/ui/breadcrumb";
|
|
import { Separator } from "@/components/ui/separator";
|
|
import {
|
|
SidebarInset,
|
|
SidebarProvider,
|
|
SidebarTrigger,
|
|
} from "@/components/ui/sidebar";
|
|
import { auth } from "@/lib/auth";
|
|
import { headers } from "next/headers";
|
|
import { AccountPopover } from "./account-popver";
|
|
|
|
export async function ApplicationLayout({
|
|
children,
|
|
}: { children: React.ReactNode }) {
|
|
const session = await auth.api.getSession({
|
|
headers: await headers(), // you need to pass the headers object.
|
|
});
|
|
return (
|
|
<SidebarProvider>
|
|
<AppSidebar role={session?.user?.role || "USER"} />
|
|
<SidebarInset>
|
|
<header className="flex justify-between sticky top-0 bg-background h-16 shrink-0 items-center gap-2 border-b px-4 z-10">
|
|
<div className="flex items-center gap-2 ">
|
|
<SidebarTrigger className="-ml-1" />
|
|
<Separator orientation="vertical" className="mr-2 h-4" />
|
|
<Breadcrumb>
|
|
<BreadcrumbList>
|
|
<BreadcrumbItem className="hidden md:block">
|
|
<BreadcrumbLink href="#">MENU</BreadcrumbLink>
|
|
</BreadcrumbItem>
|
|
<BreadcrumbSeparator className="hidden md:block" />
|
|
<BreadcrumbItem>
|
|
<BreadcrumbPage>Sar Link Portal v1.0.0</BreadcrumbPage>
|
|
</BreadcrumbItem>
|
|
</BreadcrumbList>
|
|
</Breadcrumb>
|
|
</div>
|
|
|
|
<div className="flex items-center gap-2">
|
|
<ModeToggle />
|
|
<AccountPopover user={session?.user} />
|
|
</div>
|
|
</header>
|
|
<div className="p-4">{children}</div>
|
|
</SidebarInset>
|
|
</SidebarProvider>
|
|
);
|
|
}
|