task(E6-frontend): guest panel with ribbon entry and api client

This commit is contained in:
Agent Zero
2026-08-28 07:30:43 +02:00
parent e99cf597f8
commit 5eb741d2a7
4 changed files with 204 additions and 0 deletions
+12
View File
@@ -19,6 +19,7 @@ import MobileDrawers from './components/MobileDrawers';
import BackgroundImport from './components/BackgroundImport';
import HistoryPanel from './components/HistoryPanel';
import V2HistoryPanel from './components/V2HistoryPanel';
import GuestPanel from './components/GuestPanel';
import { V2_TOOLS_ENABLED } from './kernel/featureFlags';
import SettingsModal from './components/SettingsModal';
import InlineTextEditor from './components/InlineTextEditor';
@@ -176,6 +177,7 @@ const CADEditor: React.FC<CADEditorProps> = ({ projectId, token, onNavigateBack
// History panel
const [historyPanelOpen, setHistoryPanelOpen] = useState(false);
const [guestPanelOpen, setGuestPanelOpen] = useState(false);
// Export format selector (cross-browser replacement for nwsave)
const [exportFormatOpen, setExportFormatOpen] = useState(false);
@@ -1148,6 +1150,7 @@ const CADEditor: React.FC<CADEditorProps> = ({ projectId, token, onNavigateBack
// ─── Tools actions ───
if (action === 'measure') { setActiveTool('dimension'); setCommandHistory((prev) => [...prev, { prefix: '·', text: 'Messwerkzeug aktiv', type: 'info' }]); return; }
if (action === 'history') { setHistoryPanelOpen((prev) => !prev); return; }
if (action === 'guests') { setGuestPanelOpen((prev) => !prev); return; }
// ─── V2 tools (Task A4.13): 'v2tool:<id>' → aktives Tool umschalten. Der
// bestehende CanvasArea-Sync aus A4.1 routet es an den Dispatcher (Flag aktiv).
@@ -1762,6 +1765,15 @@ const CADEditor: React.FC<CADEditorProps> = ({ projectId, token, onNavigateBack
onClose={() => setHistoryPanelOpen(false)}
/>
))}
{guestPanelOpen && drawingId && (
<div className="guest-panel-overlay" style={{ position: 'fixed', top: 60, right: 12, width: 300, maxHeight: '70vh', background: 'var(--bg-secondary, #1e1e2e)', color: 'var(--fg-primary, #e0e0e0)', border: '1px solid rgba(128,128,128,0.3)', borderRadius: 8, boxShadow: '0 4px 16px rgba(0,0,0,0.4)', zIndex: 1000, display: 'flex', flexDirection: 'column' }}>
<GuestPanel
token={token}
drawingId={drawingId}
onClose={() => setGuestPanelOpen(false)}
/>
</div>
)}
{exportFormatOpen && (
<div className="export-format-overlay" onClick={() => setExportFormatOpen(false)}>
<div className="export-format-modal" onClick={(e) => e.stopPropagation()}>