mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: update icon handling and restructure sidebar external links
This commit is contained in:
@@ -17,7 +17,7 @@ import {
|
|||||||
Forward,
|
Forward,
|
||||||
GalleryVerticalEnd,
|
GalleryVerticalEnd,
|
||||||
GitBranch,
|
GitBranch,
|
||||||
Heart,
|
HeartIcon,
|
||||||
KeyRound,
|
KeyRound,
|
||||||
type LucideIcon,
|
type LucideIcon,
|
||||||
Package,
|
Package,
|
||||||
@@ -87,7 +87,7 @@ interface NavItem {
|
|||||||
interface ExternalLink {
|
interface ExternalLink {
|
||||||
name: string;
|
name: string;
|
||||||
url: string;
|
url: string;
|
||||||
icon: LucideIcon;
|
icon: React.ComponentType<{ className?: string }>;
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
@@ -212,17 +212,6 @@ const data = {
|
|||||||
// url: "/dashboard/settings/notifications",
|
// url: "/dashboard/settings/notifications",
|
||||||
// },
|
// },
|
||||||
// ],
|
// ],
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: "Appearance",
|
|
||||||
// icon: Frame,
|
|
||||||
// items: [
|
|
||||||
// {
|
|
||||||
// title: "Theme",
|
|
||||||
// url: "/dashboard/settings/appearance",
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
// },
|
|
||||||
] as NavItem[],
|
] as NavItem[],
|
||||||
settings: [
|
settings: [
|
||||||
{
|
{
|
||||||
@@ -312,13 +301,8 @@ const data = {
|
|||||||
isActive: false,
|
isActive: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
// {
|
|
||||||
// title: "Appearance",
|
|
||||||
// url: "/dashboard/settings/appearance",
|
|
||||||
// icon: Frame,
|
|
||||||
// },
|
|
||||||
] as NavItem[],
|
] as NavItem[],
|
||||||
projects: [
|
help: [
|
||||||
{
|
{
|
||||||
name: "Documentation",
|
name: "Documentation",
|
||||||
url: "https://docs.dokploy.com/docs/core",
|
url: "https://docs.dokploy.com/docs/core",
|
||||||
@@ -332,19 +316,10 @@ const data = {
|
|||||||
{
|
{
|
||||||
name: "Sponsor",
|
name: "Sponsor",
|
||||||
url: "https://opencollective.com/dokploy",
|
url: "https://opencollective.com/dokploy",
|
||||||
icon: Heart,
|
icon: ({ className }) => (
|
||||||
|
<HeartIcon className={cn("text-red-500 fill-red-600 animate-heartbeat", className)} />
|
||||||
|
),
|
||||||
},
|
},
|
||||||
|
|
||||||
// {
|
|
||||||
// name: "Sales & Marketing",
|
|
||||||
// url: "#",
|
|
||||||
// icon: PieChart,
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: "Travel",
|
|
||||||
// url: "#",
|
|
||||||
// icon: Map,
|
|
||||||
// },
|
|
||||||
] as ExternalLink[],
|
] as ExternalLink[],
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -652,13 +627,20 @@ export default function Page({ children }: Props) {
|
|||||||
<SidebarGroup className="group-data-[collapsible=icon]:hidden">
|
<SidebarGroup className="group-data-[collapsible=icon]:hidden">
|
||||||
<SidebarGroupLabel>Extra</SidebarGroupLabel>
|
<SidebarGroupLabel>Extra</SidebarGroupLabel>
|
||||||
<SidebarMenu>
|
<SidebarMenu>
|
||||||
{data.projects.map((item) => (
|
{data.help.map((item: ExternalLink) => (
|
||||||
<SidebarMenuItem key={item.name}>
|
<SidebarMenuItem key={item.name}>
|
||||||
<SidebarMenuButton asChild>
|
<SidebarMenuButton asChild>
|
||||||
<Link href={item.url}>
|
<a
|
||||||
<item.icon />
|
href={item.url}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="flex w-full items-center gap-2"
|
||||||
|
>
|
||||||
|
<span className="mr-2">
|
||||||
|
<item.icon className="h-4 w-4" />
|
||||||
|
</span>
|
||||||
<span>{item.name}</span>
|
<span>{item.name}</span>
|
||||||
</Link>
|
</a>
|
||||||
</SidebarMenuButton>
|
</SidebarMenuButton>
|
||||||
</SidebarMenuItem>
|
</SidebarMenuItem>
|
||||||
))}
|
))}
|
||||||
|
|||||||
Reference in New Issue
Block a user