update: fix ui sidebar

This commit is contained in:
Théo LAGACHE
2026-02-11 14:42:07 +01:00
parent d9badeacba
commit a61791fdb2
12 changed files with 51 additions and 57 deletions
@@ -1,12 +1,9 @@
import {
Sidebar,
SidebarContent,
SidebarFooter,
SidebarHeader,
SidebarMenu,
SidebarMenuButton,
SidebarMenuItem,
SidebarSeparator
SidebarMenuItem
} 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";
@@ -15,7 +12,6 @@ import {OrganizationCombobox} from "@/components/wrappers/dashboard/organization
import {env} from "@/env.mjs";
import {LoggedInButton} from "@/components/wrappers/dashboard/common/logged-in/logged-in-button.server";
import {UpdateNotification} from "@/features/updates/components/update-notification";
import {Book} from "lucide-react";
export function AppSidebar() {
const projectName = env.PROJECT_NAME;
@@ -37,28 +33,13 @@ export function AppSidebar() {
</SidebarContent>
<UpdateNotification />
<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>
<SidebarMenu className="mb-2">
<SidebarMenuItem className="p-2">
<LoggedInButton/>
</SidebarMenuItem>
</SidebarMenu>
<SideBarFooterCredit/>
</Sidebar>
);
}
}
@@ -7,20 +7,17 @@ import {
Layers,
ChartArea,
ShieldHalf,
Building, UserRoundCog, Mail, PackageOpen, Logs, Megaphone, Blocks, Warehouse
Building, UserRoundCog, Mail, PackageOpen, Logs, Megaphone, Blocks, Warehouse, BookOpen
} from "lucide-react";
import {SidebarGroupItem, SidebarMenuCustomBase} from "@/components/wrappers/dashboard/common/sidebar/menu-sidebar";
import {authClient, useSession} from "@/lib/auth/auth-client";
import {authClient} from "@/lib/auth/auth-client";
export const SidebarMenuCustomMain = () => {
const BASE_URL = `/dashboard`;
const {data: activeOrganization} = authClient.useActiveOrganization();
const {data: organizations} = authClient.useListOrganizations();
const {data: session, isPending, error} = authClient.useSession();
const member = authClient.useActiveMember();
if (isPending) return null;
@@ -50,6 +47,20 @@ export const SidebarMenuCustomMain = () => {
type: "list",
group_content: groupContent,
},
{
label: "Resources",
type: "list",
group_content: [
{
title: "Documentation",
url: "https://portabase.io/docs",
icon: BookOpen,
type: "item",
redirect: true,
not_from_base_url: true,
}
],
},
];
@@ -109,4 +120,4 @@ export const SidebarMenuCustomMain = () => {
return <SidebarMenuCustomBase baseUrl={BASE_URL} items={items}/>;
};
};
@@ -16,4 +16,4 @@ export const SideBarFooterCredit = (props: SideBarFooterCreditProps) => {
)}
</>
);
};
};