From c8286b931b024b62b9da8d08806672db84930bc1 Mon Sep 17 00:00:00 2001 From: karim Date: Wed, 20 May 2026 22:07:23 +0200 Subject: [PATCH] About-Dialog als eigenes Fenster (Eto-Form + WebView) statt Inline-Modal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User-Feedback: About sollte nicht als overlay im Panel erscheinen sondern ein echtes OS-Fenster sein wie Kamera/Masse-Settings. Neu: - rhino/about.py: open_as_window() via panel_base.open_satellite_window (read-only, kein Bridge-Save/Cancel-Callback noetig) - src/AboutApp.jsx: gleiche Inhalte wie der vorige Modal — Versionen, Autor, Website, Lizenz — in einer 440x380 Eto-Form - src/main.jsx: mode 'about' → AboutApp - openAbout() in rhinoBridge.js sendet OPEN_ABOUT an Oberleiste - OberleisteBridge handler OPEN_ABOUT → about.open_as_window() OberleisteApp: - Logo-onClick aufgeräumt: openAbout() statt setAboutOpen(true) - aboutOpen-State und die AboutModal-Komponente entfernt Co-Authored-By: Claude Opus 4.7 --- rhino/about.py | 24 ++++++++++++ rhino/oberleiste.py | 8 ++++ src/AboutApp.jsx | 55 ++++++++++++++++++++++++++++ src/OberleisteApp.jsx | 83 +----------------------------------------- src/lib/rhinoBridge.js | 1 + src/main.jsx | 2 + 6 files changed, 92 insertions(+), 81 deletions(-) create mode 100644 rhino/about.py create mode 100644 src/AboutApp.jsx diff --git a/rhino/about.py b/rhino/about.py new file mode 100644 index 0000000..231c912 --- /dev/null +++ b/rhino/about.py @@ -0,0 +1,24 @@ +#! python 3 +# -*- coding: utf-8 -*- +""" +about.py +About-Dialog als Eto-Form + WebView. Vom DOSSIER-Logo-Klick in der +Oberleiste geoeffnet. Read-only — keine Bridge-Endpoints noetig. +""" +import os +import sys + +_HERE = os.path.dirname(os.path.abspath(__file__)) +if _HERE not in sys.path: + sys.path.insert(0, _HERE) + +import panel_base + + +def open_as_window(): + """Oeffnet das About-Fenster (Eto.Form + WebView). Read-only Info + (Versionen + Lizenz) — Standard-SAVE/CANCEL-Bridge ohne Callbacks.""" + panel_base.open_satellite_window( + "about", + title="Über Dossier", + size=(440, 380)) diff --git a/rhino/oberleiste.py b/rhino/oberleiste.py index 4050b39..c50e76d 100644 --- a/rhino/oberleiste.py +++ b/rhino/oberleiste.py @@ -898,6 +898,14 @@ class OberleisteBridge(panel_base.BaseBridge): except Exception as ex: print("[OBERLEISTE] open kamera:", ex) + # --- About-Fenster ---------------------------------------------- + elif t == "OPEN_ABOUT": + try: + import about + about.open_as_window() + except Exception as ex: + print("[OBERLEISTE] open about:", ex) + # --- Masse (Mass-Style) ----------------------------------------- elif t == "SET_MASSE_ACTIVE": try: diff --git a/src/AboutApp.jsx b/src/AboutApp.jsx new file mode 100644 index 0000000..3a6deac --- /dev/null +++ b/src/AboutApp.jsx @@ -0,0 +1,55 @@ +import { useEffect } from 'react' +import { notifyReady } from './lib/rhinoBridge' + +export default function AboutApp() { + useEffect(() => { notifyReady() }, []) + + return ( +
+
+ + DOSSIER. + +
+
+ Teil von OpenStudio +
+ +
+ Launcher + v{__LAUNCHER_VERSION__} + Plugin + v{__APP_VERSION__} + Autor + Karim Gabriele Varano + Website + + gabrielevarano.ch + + Lizenz + Proprietär — © 2026 Karim Gabriele Varano +
+ +
+ Rhino 8 Plugin für architektonische Workflows — Wände, Decken, + Öffnungen, Räume, SIA 416, Plan-Layouts. Schwester-App: Rapport. +
+
+ ) +} diff --git a/src/OberleisteApp.jsx b/src/OberleisteApp.jsx index 96c17ec..12b571a 100644 --- a/src/OberleisteApp.jsx +++ b/src/OberleisteApp.jsx @@ -11,6 +11,7 @@ import { deleteLayerCombination, openLayerCombinationsDialog, openDossierSettings, openKameraPanel, setMasseActive, openMasseSettings, + openAbout, } from './lib/rhinoBridge' const PRESETS = [ @@ -208,7 +209,6 @@ export default function OberleisteApp() { const [draft, setDraft] = useState('') const [customMode, setCustomMode] = useState(false) // Dropdown -> Custom-Input switch const customInputRef = useRef(null) - const [aboutOpen, setAboutOpen] = useState(false) useEffect(() => { onMessage('STATE', (s) => { @@ -298,7 +298,7 @@ export default function OberleisteApp() { }}> {/* Logo: DOSSIER. (Petrol-Punkt) — Klick = About-Fenster */} - - ) } diff --git a/src/lib/rhinoBridge.js b/src/lib/rhinoBridge.js index 85f2777..a79df68 100644 --- a/src/lib/rhinoBridge.js +++ b/src/lib/rhinoBridge.js @@ -170,6 +170,7 @@ export function setOverridesPreset(name) { send('SET_OVERRIDES_PRESET', { name: export function saveOverridesPreset(name) { send('SAVE_OVERRIDES_PRESET', { name }) } export function openOverridesPanel() { send('OPEN_OVERRIDES_PANEL', {}) } export function openKameraPanel() { send('OPEN_KAMERA_PANEL', {}) } +export function openAbout() { send('OPEN_ABOUT', {}) } // --- Masse (in Oberleiste + Satellite-Fenster MasseSettings) --- // Topbar: aktives Mass setzen + Settings-Fenster oeffnen diff --git a/src/main.jsx b/src/main.jsx index 768fc78..2919b0b 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -13,6 +13,7 @@ import SwisstopoApp from './SwisstopoApp.jsx' import OsmApp from './OsmApp.jsx' import KameraApp from './KameraApp.jsx' import MasseSettingsApp from './MasseSettingsApp.jsx' +import AboutApp from './AboutApp.jsx' import GestaltungApp from './GestaltungApp.jsx' import AusschnitteApp from './AusschnitteApp.jsx' import MassstabApp from './MassstabApp.jsx' @@ -44,6 +45,7 @@ const RootApp = mode === 'gestaltung' ? GestaltungApp : mode === 'osm' ? OsmApp : mode === 'kamera' ? KameraApp : mode === 'masse_settings' ? MasseSettingsApp + : mode === 'about' ? AboutApp : App window.onerror = function (msg, src, line, col, err) {