diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 8e5b134..61c5eda 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -55,6 +55,13 @@ const initialKIMessages: KIMessage[] = [ { id: 'ki-1', role: 'assistant', content: 'Hallo! Ich bin der KI Copilot. Wie kann ich helfen?' }, ]; +const rightTabItems: Array<{ id: DrawerTab; label: string; svg: React.ReactNode }> = [ + { id: 'tool', label: 'Wz', svg: }, + { id: 'layer', label: 'Layer', svg: }, + { id: 'library', label: 'Lib', svg: }, + { id: 'ki', label: 'KI', svg: }, +]; + const initialKISuggestions: KISuggestion[] = [ { id: 'sug-1', label: 'Bestuhlung automatisch generieren' }, { id: 'sug-2', label: 'Maße analysieren' }, @@ -938,6 +945,8 @@ const CADEditor: React.FC = ({ projectId, token, onNavigateBack onRedo={handleRedo} onThemeToggle={handleThemeToggle} theme={theme} + onOpenLeftDrawer={() => setMobileLeftOpen(true)} + onNavigateBack={onNavigateBack} /> = ({ projectId, token, onNavigateBack onToggleGrid={handleToggleGrid} seatCount={seatCount} /> +
+ {rightTabItems.map(tab => ( + + ))} +
= ({ projectId, token, onNavigateBack onCloseLeft={() => setMobileLeftOpen(false)} onCloseRight={() => setMobileRightOpen(false)} onRightTabChange={setActiveDrawerTab} + leftContent={ + + } + rightContent={ + setActiveDrawerTab(p as DrawerTab)} + selectedElement={selectedElement} + layers={layers} + blocks={blocks} + activeLayerId={activeLayerId} + onSelectLayer={handleSelectLayer} + onAddLayer={handleAddLayer} + onToggleLayer={handleToggleLayer} + onDeleteLayer={handleDeleteLayer} + onRenameLayer={handleRenameLayer} + onDuplicateLayer={handleDuplicateLayer} + onToggleLock={handleToggleLock} + onElementsDeleted={handleElementsDeleted} + onToggleElementVisible={handleToggleElementVisible} + elements={elements} + onRenameBlock={handleRenameBlock} + onDuplicateBlock={handleDuplicateBlock} + onDeleteBlock={handleDeleteBlock} + onSvgImport={handleSvgImport} + onSaveGroupAsBlock={handleSaveGroupAsBlock} + onBlockCategoryChange={handleBlockCategoryChange} + onBlockSearch={handleBlockSearch} + onDragBlock={handleDragBlock} + kiMessages={kiMessages} + kiSuggestions={kiSuggestions} + onKISend={handleKISend} + onKISuggestionClick={handleSuggestionClick} + kiLoading={kiLoading} + /> + } /> ]; const MobileDrawers: React.FC = ({ - leftOpen, rightOpen, activeRightTab, onCloseLeft, onCloseRight, onRightTabChange, + leftOpen, rightOpen, activeRightTab, onCloseLeft, onCloseRight, onRightTabChange, leftContent, rightContent, }) => { return ( <> @@ -23,7 +23,7 @@ const MobileDrawers: React.FC = ({
- {/* Filled by LeftSidebar content on mobile */} + {leftContent}
@@ -49,7 +49,7 @@ const MobileDrawers: React.FC = ({ ))}
- {/* Filled by panel content on mobile */} + {rightContent}
diff --git a/frontend/src/components/Topbar.tsx b/frontend/src/components/Topbar.tsx index dd87b2b..0515f24 100644 --- a/frontend/src/components/Topbar.tsx +++ b/frontend/src/components/Topbar.tsx @@ -1,11 +1,11 @@ import React from 'react'; import type { TopbarProps } from '../types/ui.types'; -const Topbar: React.FC = ({ projectName, savedStatus, onUndo, onRedo, onThemeToggle, theme, onOpenSettings }) => { +const Topbar: React.FC = ({ projectName, savedStatus, onUndo, onRedo, onThemeToggle, theme, onOpenSettings, onOpenLeftDrawer, onNavigateBack }) => { return (
- web-cad | - - - - @@ -46,7 +46,7 @@ const Topbar: React.FC = ({ projectName, savedStatus, onUndo, onRed -