b1b2090b3e
Zwei Dinge: 1. embedded-Mode in den Dialog-Komponenten — wenn TRUE, kein Backdrop + keine MaxWidth-Constraint, das Dialog fuellt das ganze WebView statt wie ein kleines zentriertes Fenster IN dem WebView gerendert zu werden (= "Fenster im Fenster"-Effekt). Betroffen: - GeschossSettingsDialog - EbenenSettingsDialog - GeschossDialog Satelliten-Apps (GeschossSettingsApp, EbenenSettingsApp, GeschossDialogApp) passen jetzt `embedded` durch. 2. GeschossDialog (= der grosse Mehrfach-Editor hinter dem Pencil-Button) laeuft jetzt auch als Satelliten-Fenster — selbe Architektur wie die Settings-Dialoge. Backend hat neuen Handler _open_geschoss_dialog und neuen Message OPEN_GESCHOSS_DIALOG. Auf Save: ganze z-Liste replace + _apply(save_z=True). GeschossManager braucht den inline-Dialog-State nicht mehr; Pencil-Button ruft openGeschossDialog(zeichnungsebenen). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
34 lines
1.0 KiB
React
34 lines
1.0 KiB
React
import { useEffect } from 'react'
|
|
import GeschossSettingsDialog from './components/GeschossSettingsDialog'
|
|
import { notifyReady } from './lib/rhinoBridge'
|
|
|
|
function bridgeSend(type, payload = {}) {
|
|
if (!window.RHINO_MODE) { console.log('[Bridge] →', type, payload); return }
|
|
const json = JSON.stringify({ type, payload })
|
|
document.title = 'RHINOMSG::' + json
|
|
}
|
|
|
|
export default function GeschossSettingsApp() {
|
|
const initial = (typeof window !== 'undefined' && window.PANEL_PARAMS) || {}
|
|
|
|
useEffect(() => {
|
|
notifyReady()
|
|
const blockContext = (ev) => ev.preventDefault()
|
|
document.addEventListener('contextmenu', blockContext)
|
|
return () => document.removeEventListener('contextmenu', blockContext)
|
|
}, [])
|
|
|
|
if (!initial || typeof initial !== 'object') {
|
|
return <div style={{ padding: 20, color: 'var(--text-muted)' }}>Keine Daten</div>
|
|
}
|
|
|
|
return (
|
|
<GeschossSettingsDialog
|
|
embedded
|
|
geschoss={initial}
|
|
onSave={(updated) => bridgeSend('SAVE', updated)}
|
|
onClose={() => bridgeSend('CANCEL', {})}
|
|
/>
|
|
)
|
|
}
|