Files
deer-flow/frontend/src/components/workspace/workspace-sidebar.tsx

54 lines
1.4 KiB
TypeScript
Raw Normal View History

2026-01-20 14:06:47 +08:00
import { SettingsIcon } from "lucide-react";
2026-01-15 23:40:21 +08:00
import {
Sidebar,
SidebarHeader,
SidebarContent,
SidebarFooter,
SidebarRail,
2026-01-20 14:06:47 +08:00
SidebarMenu,
SidebarMenuItem,
SidebarMenuButton,
SidebarGroup,
SidebarGroupContent,
2026-01-15 23:40:21 +08:00
} from "@/components/ui/sidebar";
2026-01-20 14:06:47 +08:00
import { useI18n } from "@/core/i18n/hooks";
2026-01-15 23:40:21 +08:00
import { RecentChatList } from "./recent-chat-list";
import { WorkspaceHeader } from "./workspace-header";
import { WorkspaceNavMenu } from "./workspace-nav-menu";
export function WorkspaceSidebar({
...props
}: React.ComponentProps<typeof Sidebar>) {
2026-01-20 14:06:47 +08:00
const { t } = useI18n();
2026-01-15 23:40:21 +08:00
return (
<Sidebar variant="sidebar" collapsible="icon" {...props}>
<SidebarHeader className="py-0">
<WorkspaceHeader />
</SidebarHeader>
<SidebarContent>
<WorkspaceNavMenu />
<RecentChatList />
</SidebarContent>
2026-01-20 14:06:47 +08:00
<SidebarFooter>
<SidebarGroup className="px-0">
<SidebarGroupContent>
<SidebarMenu>
<SidebarMenuItem>
<SidebarMenuButton asChild>
<div className="text-muted-foreground cursor-pointer">
<SettingsIcon size={16} />
<span>{t.common.settings}</span>
</div>
</SidebarMenuButton>
</SidebarMenuItem>
</SidebarMenu>
</SidebarGroupContent>
</SidebarGroup>
</SidebarFooter>
2026-01-15 23:40:21 +08:00
<SidebarRail />
</Sidebar>
);
}