import { Link } from "react-router-dom"; import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarHeader, SidebarMenu, SidebarMenuButton, SidebarMenuItem, useSidebar, } from "@/components/ui/sidebar"; import { t } from "i18next"; import { cn } from "@root/lib/utils"; import { Home, Users, Server, Cable, ListChecks, FileText, Settings, EarthLock, } from "lucide-react"; import { UpdateButton } from "@/components/layout/update-button"; import React from "react"; import { SheetClose } from "@/components/ui/sheet"; import logo from "@/assets/image/logo.png"; const menuItems = [ { title: "Home", url: "/home", icon: Home }, { title: "Profiles", url: "/profile", icon: Users }, { title: "Proxies", url: "/proxies", icon: Server }, { title: "Connections", url: "/connections", icon: Cable }, { title: "Rules", url: "/rules", icon: ListChecks }, { title: "Logs", url: "/logs", icon: FileText }, { title: "Settings", url: "/settings", icon: Settings }, ]; export function AppSidebar() { const { isMobile } = useSidebar(); return ( logo Koala Clash {menuItems.map((item) => { const isActive = location.pathname === item.url; const linkElement = ( {t(item.title)} ); return ( {isMobile ? ( {linkElement} ) : ( linkElement )} ); })}
); }