import React from 'react'; import { ChevronRight } from 'lucide-react'; import { Sidebar } from './Sidebar'; import { Header } from './Header'; import type { CurrentUserMenuNodeDto } from '../../types/authSession'; interface LayoutProps { children: React.ReactNode; currentView: string; setCurrentView: (view: string) => void; menus?: CurrentUserMenuNodeDto[]; onLogout?: () => void; /** 点击顶栏右上角当前用户区域 */ onProfileClick?: () => void; /** 标签模板编辑器全屏:隐藏侧栏与顶栏,主内容占满视口 */ hideAppChrome?: boolean; } export function Layout({ children, currentView, setCurrentView, menus, onLogout, onProfileClick, hideAppChrome = false, }: LayoutProps) { return (
{!hideAppChrome && ( )}
{!hideAppChrome && ( <>
setCurrentView('Support')} onProfileClick={onProfileClick} />
)}
{children}
); }