Files
portabase/src/components/wrappers/dashboard/common/sidebar/app-sidebar.tsx
T

65 lines
2.5 KiB
TypeScript
Raw Normal View History

2025-07-26 14:43:59 +02:00
import {
Sidebar,
SidebarContent,
2026-02-10 17:02:06 +01:00
SidebarFooter,
2025-07-26 14:43:59 +02:00
SidebarHeader,
SidebarMenu,
2026-02-10 17:02:06 +01:00
SidebarMenuButton,
SidebarMenuItem,
SidebarSeparator
2025-07-26 14:43:59 +02:00
} from "@/components/ui/sidebar";
import {SidebarLogo} from "@/components/wrappers/dashboard/common/sidebar/logo-sidebar";
import {SidebarMenuCustomMain} from "@/components/wrappers/dashboard/common/sidebar/menu-sidebar-main";
import {SideBarFooterCredit} from "@/components/wrappers/dashboard/common/sidebar/side-bar-footer-credit";
import {OrganizationCombobox} from "@/components/wrappers/dashboard/organization/organization-combobox";
2025-11-04 08:48:46 +01:00
import {env} from "@/env.mjs";
2025-12-21 20:17:05 +01:00
import {LoggedInButton} from "@/components/wrappers/dashboard/common/logged-in/logged-in-button.server";
2026-01-28 16:39:46 +01:00
import {UpdateNotification} from "@/features/updates/components/update-notification";
2026-02-10 17:02:06 +01:00
import {Book} from "lucide-react";
2025-07-26 14:43:59 +02:00
export function AppSidebar() {
2025-11-04 08:48:46 +01:00
const projectName = env.PROJECT_NAME;
2025-07-26 14:43:59 +02:00
return (
2025-12-22 20:32:18 +01:00
<Sidebar collapsible="icon" >
2025-07-26 14:43:59 +02:00
<SidebarHeader>
<SidebarMenu>
<SidebarMenuItem>
2025-11-04 08:48:46 +01:00
<SidebarLogo projectName={projectName ?? "Portabase"}/>
2025-07-26 14:43:59 +02:00
</SidebarMenuItem>
<SidebarMenuItem>
<OrganizationCombobox/>
</SidebarMenuItem>
</SidebarMenu>
</SidebarHeader>
<SidebarContent>
<SidebarMenuCustomMain/>
</SidebarContent>
2026-01-28 16:39:46 +01:00
<UpdateNotification />
2026-02-10 17:02:06 +01:00
<SidebarFooter>
<SidebarSeparator />
<div className="flex flex-col gap-1 p-2">
<a
href="https://portabase.io/docs"
target="_blank"
rel="noreferrer"
className="flex items-center gap-2 px-2 py-1.5 text-sm text-muted-foreground hover:text-foreground transition-colors group-data-[collapsible=icon]:justify-center"
>
<Book className="size-4 shrink-0" />
<span className="group-data-[collapsible=icon]:hidden">Documentation</span>
</a>
</div>
<SidebarMenu className="mb-2">
<SidebarMenuItem className="p-2">
<LoggedInButton/>
</SidebarMenuItem>
</SidebarMenu>
<SideBarFooterCredit/>
</SidebarFooter>
2025-07-26 14:43:59 +02:00
</Sidebar>
);
}