Implement portfolio admin management

This commit is contained in:
MOH
2026-03-07 16:06:20 +01:00
parent f983ce2203
commit ea64373853
35 changed files with 5126 additions and 178 deletions
+39 -13
View File
@@ -11,6 +11,7 @@ type SidebarItem = {
href: string;
icon: LucideIcon;
active?: boolean;
children?: SidebarItem[];
};
type AppSidebarProps = {
@@ -37,19 +38,44 @@ export function AppSidebar({
const Icon = item.icon;
return (
<Link
key={item.label}
href={item.href}
className={cn(
"flex items-center gap-2 rounded-nested px-3 py-2 text-sm transition-colors",
item.active
? "bg-sidebar-primary text-sidebar-primary-foreground"
: "text-sidebar-foreground/80 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
)}
>
<Icon className="h-4 w-4" />
<span>{item.label}</span>
</Link>
<div key={item.label} className="space-y-1">
<Link
href={item.href}
className={cn(
"flex items-center gap-2 rounded-nested px-3 py-2 text-sm transition-colors",
item.active
? "bg-sidebar-primary text-sidebar-primary-foreground"
: "text-sidebar-foreground/80 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
)}
>
<Icon className="h-4 w-4" />
<span>{item.label}</span>
</Link>
{item.children?.length ? (
<div className="ml-3 space-y-1 border-l border-sidebar-border pl-3">
{item.children.map((child) => {
const ChildIcon = child.icon;
return (
<Link
key={child.label}
href={child.href}
className={cn(
"flex items-center gap-2 rounded-nested px-3 py-2 text-sm transition-colors",
child.active
? "bg-sidebar-primary text-sidebar-primary-foreground"
: "text-sidebar-foreground/72 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
)}
>
<ChildIcon className="h-4 w-4" />
<span>{child.label}</span>
</Link>
);
})}
</div>
) : null}
</div>
);
})}
</CardContent>