gaza/src/shell/WorkspaceLayout.tsx
Ubuntu bf8d048b67 合并主线并解决应用壳层冲突
Co-authored-by: multica-agent <github@multica.ai>
2026-08-03 19:31:35 +00:00

11 lines
1.2 KiB
TypeScript

import { ReactNode } from "react";
import type { OperationTab, TeamserverWorkspace } from "../workspace";
import { ContextBar } from "./ContextBar";
import { OperationTabs } from "./OperationTabs";
import { ProjectSidebar } from "./ProjectSidebar";
import { StatusBar } from "./StatusBar";
import { TeamserverRail } from "./TeamserverRail";
export interface WorkspaceLayoutProps { servers: TeamserverWorkspace[]; server: TeamserverWorkspace; activeTab: OperationTab; activePage?: string; children: ReactNode; onSwitchServer: (id: string) => void; onActivateTab: (id: string) => void; onNavigate?: (page: string) => void; }
export function WorkspaceLayout({ servers, server, activeTab, activePage = activeTab.title, children, onSwitchServer, onActivateTab, onNavigate }: WorkspaceLayoutProps) { return <main className="shell"><TeamserverRail servers={servers} activeServerId={server.id} onSwitch={onSwitchServer} /><ProjectSidebar server={server} activePage={activePage} onNavigate={onNavigate} /><section className="workspace"><OperationTabs serverName={server.name} tabs={server.tabs} activeTabId={activeTab.id} onActivate={onActivateTab} /><ContextBar serverName={server.name} tab={activeTab} />{children}<StatusBar connection={server.connection} /></section></main>; }