Merge branch 'worktree-agent-ad6a558d2f19492ab' into claude/practical-noether-1hb2s1
This commit is contained in:
16 files changed
+450
-71
No files matched your search
@@ -66,7 +66,7 @@ Kennwort, anonym) als PDF; Austausch mit Fachplanern über DXF/IFC.
|
||||
der Parameterliste („Neu würfeln“). Unbekannte Id = Platzhalter-Rahmen. 14.11. (später): e2e `e2e/objectLibrary253.spec.ts` (Palette, WC + Esstisch, R/M, Objekt-Info, Breite,
|
||||
Neu würfeln, Undo samt Klasse; Test-Naht `libobjs`), Rust-Test Belag-Aussparen ([156]: Möbel/Sanitär ja, Auto/Parkfeld/Wendekreis nein),
|
||||
DXF als `BLOCK` `DOSSIER_<id>_<hash>` + `INSERT` (gleiche Parameter = ein Block, `doc/DATEIFORMATE.md`). Offen: auf dem Mac nicht geprüft; Ziehen aus der Palette (nur Klick);
|
||||
3D nach 1.0 (Trait hat Platz für `geometry3d`); Symbole nur im CLI-SVG/Chromium angesehen, nicht in der Tauri-App; DXF-Block ohne Attribute (Id/Parameter nur im Blocknamen). Vorgaben ohne Antwort des Maintainers: abstrakt, nur 55er-Raster, nur 2D. · M
|
||||
3D nach 1.0 (Trait hat Platz für `geometry3d`); Symbole nur im CLI-SVG/Chromium angesehen, nicht in der Tauri-App; DXF-Block ohne Attribute (Id/Parameter nur im Blocknamen). 14.11. UI-Review (Chromium, de/en, 1440×900 und 1024×700, hell/dunkel): Palette ohne Wortbruch mitten im Wort (weiche Trennstriche), Objekt-Info-Zeile „Objekt“ nicht mehr abgeschnitten. Offen: Klassen-Namen der Objekt-Klassen („23 Sanitär“) bleiben auch im englischen UI deutsch (Projektdaten); Palette im 900-px-Fenster war nur ca. 270 px hoch: behoben 14.11. (spät) — Dock links oben 1,6 : 1 (Layout v15, ca. 480 px bei 900 px) und Gruppen merken offen/zu (`localStorage` `cad.objlib.open`); Mac nicht geprüft. Vorgaben ohne Antwort des Maintainers: abstrakt, nur 55er-Raster, nur 2D. · M
|
||||
|
||||
## Phase 1 (13.–19.11.): Stabil und baubar
|
||||
- ◐ **[206]** Referenz-Ablauf als e2e-Spec (Browser) und als Checkliste für die Mac-Abnahme (`doc/RELEASE-1.0.md`): jeder Schritt
|
||||
@@ -237,6 +237,7 @@ Kennwort, anonym) als PDF; Austausch mit Fachplanern über DXF/IFC.
|
||||
KI-/MCP-Werkzeug `export` ohne `save` liefert bei Treffern nichts aus (Argument `ignoreAnonymity`). Der Projekt-Dateiname ist auch nach
|
||||
Autosave-Wiederherstellen und Browser-/Electron-Start-Öffnen Suchbegriff, beim „Neu“ wird er gelöscht. Offen: `dossier-cli convert` prüft nicht;
|
||||
BCF-Export bewusst ohne Tor; nicht in der Tauri-App/auf dem Mac geprüft (Dialog-Weg nur per Code-Abgleich, kein e2e für die neuen Knöpfe).
|
||||
UI-Review 14.11.: Anonymitäts-Dialog: Anführungszeichen einheitlich („…“ / “…”), englische Bereichsnamen gross geschrieben; Fokus startet auf „Abbrechen“, Tab-Reihenfolge ×, Abbrechen, Trotzdem exportieren. Fundstelle lesbar (14.11. spät): Elementart „Name“ · Feld, z. B. Material „Wärmedämmung“ · Name (`ui/anonymityPlace.ts`, Mapping der Kern-Pfade mit `t()`, Test de/en; Kern liefert weiter den Pfad).
|
||||
- [61] Raumprogramm gegen Modell und Flächennachweis SIA 416 als Tabelle/Layout-Element ([70]); Kennzahlen (GF, GV, HNF/GF, Fassadenanteil).
|
||||
- 3D-Bilder für die Abgabe: hochaufgelöster PNG-Export (Perspektive, Axonometrie, Schatten), Sonnenstand; [205] Pausfolie.
|
||||
- [199]/[204] Plan- und App-Review-Reste im Darstellungsbereich 1:500/1:200 schliessen.
|
||||
@@ -345,6 +346,7 @@ Kennwort, anonym) als PDF; Austausch mit Fachplanern über DXF/IFC.
|
||||
(braucht eine Kern-Abfrage mit Plan-Puffer als Eingabe); Stempel „Schlafen" DG 80 %. **14.11. (spät):** Klassen-Füllung im Klassen-Dialog
|
||||
editierbar (Farbwähler + „keine", Inline-Editor und macOS-Ebenenfenster; Ziehen = ein Undo-Schritt; Test `categoryFill.test.ts`); nur vitest/tsc,
|
||||
nicht in der Tauri-App angesehen. · M
|
||||
UI-Review 14.11.: Ebenen-Editor (Füllung): schwebender Editor wird nach dem Aufbau am Fensterrand geklemmt (lag vorher rechts/unten ausserhalb, Messung während der Einblend-Animation).
|
||||
- Fachplaner-Austausch: DXF/DWG je Geschoss/Schnitt/Ansicht ([200]), IFC mit Räumen/Psets ([201]); Rundreise in Archicad/Revit einmal
|
||||
real prüfen ([C9]).
|
||||
- ◐ **[259]** IFC-Export für Fachplaner (Vorprojekt, 14.11.). Alle drei Beispielprojekte mit ifcopenshell 0.9 geprüft: `validate-ifc.py`
|
||||
@@ -372,6 +374,7 @@ Kennwort, anonym) als PDF; Austausch mit Fachplanern über DXF/IFC.
|
||||
Blatt-Tabelle Quelle „siteProof“ (wie [209]), CLI `kennzahlen --nachweis`. Tests: `site_proof::tests`, `sheet_table::tests::baurecht_nachweis_tabelle`,
|
||||
`src/analysis/siteProof.test.ts`. Offen: Blatt-Tabelle nimmt aGSF/Grünfläche nicht aus den Panel-Eingaben (nur Parzellenfläche/-grenze),
|
||||
Grünfläche nur per Eingabe, Grenzabstand als Verstossfläche statt kleinster Abstand, Fassadenhöhe nur über ±0.00, Mac/Tauri nicht geprüft. · S
|
||||
UI-Review 14.11.: Flächenbilanz-Panel: Tabellen brechen Text/Köpfe um (Nachweis- und Grundlagen-Tabelle jetzt in 340 px ganz sichtbar, de/en); die breite Flächentabelle (11 Spalten) scrollt nicht mehr: in der schmalen Dock-Spalte (Container ≤ 460 px) wird jede Zeile zur Karte (Geschoss oben, Kennwerte 5 je Zeile mit Kopf über der Zahl; `.area-table.wide`, de/en bei 340 px vollständig lesbar, CSV/PDF unverändert); Fenster-/Raumbuch-/Bauteil-Tabellen (12–16 Spalten) scrollen weiterhin waagrecht. Blatt-Tabelle Baurecht (14.11. spät, als Primitive in Chromium angesehen, nicht in der Blatt-Ansicht der App): Kopf „Reserve (+) / Überschr. (−)“ und „Zulässig“/„Erfüllt“ wurden mit „…“ gekürzt → kurzer Blatt-Kopf „Reserve“, Spaltenbreiten neu (Köpfe passen ab 100 mm Rahmenbreite, Test `baurecht_tabelle_koepfe_passen`); lange Zeilentexte kürzen bei < 150 mm weiterhin mit „…“ (kein Umbruch im Blatt-Tabellenkern).
|
||||
|
||||
### Phase 4 (4.–12.12.): Härten und veröffentlichen
|
||||
- Nur noch Fehler aus dem Referenz-Ablauf; Leistung mit grossen Kontext-Importen; keine neuen Funktionen.
|
||||
@@ -1397,7 +1400,7 @@ Einzeilig mit ID, Titel, Datum (2026). Kleine Reste erledigter Punkte (z. B. [T7
|
||||
exakte Durchdringung, [61] Zuordnung per Hand, [63] Profil je Kante, [70] Flächentabelle als Layout-Element,
|
||||
[80] Einzelplan-PDF ohne Ebenen, [82] Legende per Ziehen) stehen im Archiv beim jeweiligen Eintrag.
|
||||
|
||||
- [252] Englisch „Geschoss“ = **floor** durchgehend (`en.ts`: storey/storeys → floor/floors; IFC-Schema-Namen und Bezeichner unberührt), Tab immer Befehlszeile (Ctrl+Tab / Ctrl+Umschalt+Tab = Ansichts-Reiter zyklisch, fest verdrahtet, auf dem Mac Ctrl; in Overlay-Dialogen bleibt Tab bei deren Feldern; `tabKeyAction`, `cycleTab`, Kürzel-Übersicht de/en, e2e `tabKey252.spec.ts`) (14.11.; nicht auf dem Mac geprüft, e2e nicht gelaufen, falls nicht anders vermerkt)
|
||||
- [252] Englisch „Geschoss“ = **floor** durchgehend (`en.ts`: storey/storeys → floor/floors; IFC-Schema-Namen und Bezeichner unberührt), Tab immer Befehlszeile (Ctrl+Tab / Ctrl+Umschalt+Tab = Ansichts-Reiter zyklisch, fest verdrahtet, auf dem Mac Ctrl; in Overlay-Dialogen bleibt Tab bei deren Feldern; `tabKeyAction`, `cycleTab`, Kürzel-Übersicht de/en, e2e `tabKey252.spec.ts`); UI-Review 14.11.: Kürzel-Übersicht zeigt im englischen UI „Ctrl/Shift/Del“ statt „Strg/Umschalt/Entf“ (`formatCombo`) (14.11.; nicht auf dem Mac geprüft, e2e nicht gelaufen, falls nicht anders vermerkt)
|
||||
- [244] Darstellungsarten-Menü im 3D übersichtlicher (13.11., Wunsch Maintainer, folgt auf [240]): gemeinsames `Dropdown` rückwärtskompatibel erweitert (optionale `group`, `icon`, `hint`, `shortcut` je Option; `optionRows`/`DropdownRows` exportiert, Überschriften und Trennlinien, Zweitzeile + Tooltip, Kürzel rechts). 3D-Menü (`renderModeOptions` in `TopBar.tsx`): Linien (Drahtgitter, Kanten, Nur Konturen) · Flächen (Schattiert, mit Kanten, Texturiert, Weiss) · Rendern (Pathtracing) mit Material-Symbols-Icons und Erklärung („Pathtracing: Physikalisch, rechnet fortlaufend“); de + en. Kürzel gibt es für die Stile keine. 2D-Plan (Farbig/Tusche) unverändert. Geprüft: tsc, vitest `src/ui src/i18n src/viewport`, e2e overridesTab, roomStamp218, viewTemplates, [212]-Pathtracer-Test (Chromium, Port 5194), Screenshots hell/dunkel vorher/nachher. Nicht in der Tauri-App/macOS geprüft.
|
||||
- [245] Begehen wie im Architektur-Walkthrough (13.11., Wunsch Maintainer; zu [213]). Nur TS/Viewport. `viewport/walkCollision.ts`: Raster (Zelle 2 m, Grundrissebene) aus `projectToModel3d(…, { forWalk: true })` (ohne Türflügel/Rahmen/Handläufe): Wände als Kapseln entlang der Achse mit Löchern (Loch bis zur Wand-UK = Tür, frei; Loch mit Brüstung = Fenster, Glasebene sperrt), Decken-/Trittkanten und senkrechte Netz-Dreiecke (Stützen, Körper) als Hindernisse, Oberseiten von Decken/Tritten und flache Dreiecke (Gelände, Dächer, Rampen) als Boden. Person: Zylinder r 0.25 m, 1.8 m hoch, Stufen bis 0.25 m; Bewegung in Teilschritten, hinausgeschoben (gleitet an Wänden). `walk.ts::stepWalkCollide`: Fusshöhe folgt dem Boden (ein Boden-Test je Bild, Aufstieg geglättet, Absturz sanft mit Fallgrenze 5 m/s), Q/E ändern die Augenhöhe (0.5–2.3 m); Takt läuft weiter, bis die Höhe angekommen ist. G = Geist (Kollision/Bodenfolge aus), auch als Knopf neben „Begehen“ und in der Tastenhilfe. Tests: `walkCollision.test.ts` (Wand, Gleiten, Tür/Fenster, Stufe 0.4/0.2, Treppe, Kante), `ViewportToolbar3d.test.ts`, e2e `walk.spec.ts`. 13.11. Grenzen verbessert: (1) Tür oder Fenster entscheidet `Opening.kind` (`walkInputFrom`, Loch über die Achslage der Öffnung zugeordnet): Fenster sperren auch mit Brüstung 0, Türen (auch Schiebe-/Hebeschiebetüren; „Fenstertür“ ist im Modell eine Tür, es gibt kein eigenes Kennzeichen) sind frei; ohne Treffer (Bogenwand, keine Zuordnung) gilt weiter die Höhe. (2) Für das Begehen kommen die Wandstücke mit Rechteck-Loch statt der Formöffnungs-Körper (`projectToModel3d` mit `forWalk` ohne `splitWallBodies`): Rund-/Bogentür ist über ihr umschreibendes Rechteck passierbar, ein Fenster bleibt gesperrt. (3) Die Decken tragen ihre Aussparungen im Umriss (Brücke, [202]): Deckenunterseite begrenzt den Kopf (`WalkWorld.headBlocked`), ausser über Löchern; Treppentritte zählen nicht. 13.11. (b) Bogenwände und Dachschrägen: (4) Bogenwand (bulge): die Lochlage wird über die Bogenlänge auf die Achse gebracht (Winkel um den Mittelpunkt, `axisPosition`), die Zuordnung zur Öffnung gilt nach Anteil des Lochs, den die Öffnung überdeckt (ein Loch im Sehnenstück ist oft nur ein Teil der Öffnung); Erker im Beispiel komplex: Fenster sperren. (5) Dachschrägen: `projectToModel3d` kennzeichnet im Begehen-Modell die Dachnetze (`RMesh.roof`, nur `forWalk`); deren nach unten zeigende Dreiecke (Unterseite) sind eine Kopfgrenze wie die Deckenunterseite (`headBlocked`): Schritt in Kopfhöhe unter 1.8 m (Kniestock) wird zurückgenommen, wer schon darunter steht, bleibt beweglich. Gauben/Dachfenster: das Kern-Netz führt sie als Löcher (Hauptdach − Loch), unter dem Gaubendach gilt dessen Unterseite. Tests: `walkCollision.test.ts` (Satteldach mit Kniestock, Gaube, Beispiel komplex mit tiefer Traufe, Bogenwand). Im Beispiel komplex ist der Kniestock im DG 1.8 m, dort gibt es also nichts zu begrenzen. Offen: keine echte 3D-Anzeige im Container: Bewegung nur per Test belegt, nicht am Mac/in der Tauri-App gesehen.
|
||||
- [246] Kamerafahrt (13.11., Folge aus [213]; nur TS, Chromium; Mac/Tauri nicht geprüft): Knopf „▶ Kamerafahrt“ in der Kamera-Gruppe (Panel „Ausschnitte“) fährt im 3D-Viewport in Listenreihenfolge durch die Kameras (Catmull-Rom „flüssig“ oder „geglättet“ mit Smoothstep, Bildwinkel linear, Dauer je Abschnitt Vorgabe 4 s; Esc oder Klick bricht ab; Kameras bleiben unverändert, kein Op); „Video …“ öffnet den Dialog mit Dauer, Interpolation, Format (WebM, MP4 nur wenn `MediaRecorder` es kann), Auflösung = Viewport, 30 Bilder/s, Fortschritt und Abbruch, Speichern über `saveBinaryFile`. Code: `viewport/cameraTour.ts` (Interpolation), `cameraTourPlayer.ts`, `videoRecorder.ts`, `state/cameraTourActions.ts`, `ui/CameraTourDialog.tsx` + `cameraTourDialogState.ts`; Tests vitest je Modul, e2e `cameraTour.spec.ts`. Offen: Aufnahme unter Tauri/WKWebView (fehlt `MediaRecorder` auf dem Canvas, meldet der Dialog per `notify`), Bildinhalt der Aufnahme nicht gesehen (headless WebGPU leer), im Stil Pathtracing nur Vorschau-Qualität.
|
||||
|
||||
@@ -90,7 +90,7 @@ Unterkante zwischen zwei Geschossen), lehnt der Befehl mit einer Meldung ab.
|
||||
Tische, Sitzen, Schlafen, Schränke, Aussenraum (Auto mit Parkfeld, Velo, Rollstuhl-Wendekreis). Objekt wählen, im Plan den
|
||||
Einfügepunkt klicken (Befehl `libobj`); vor dem Klick dreht R das Objekt, M spiegelt es. Die Vorschau hängt am Cursor.
|
||||
Ziehen aus der Palette gibt es nicht. Ein gesetztes Objekt wählst du an und änderst es im Panel **Objekt-Info** (Abschnitt
|
||||
„Objekt aus Bibliothek“): **Breite**, **Tiefe**, **Anzahl** und weitere Parameter; bei Esstischen mit Stühlen regelt
|
||||
„Objekt“): **Breite**, **Tiefe**, **Anzahl** und weitere Parameter; bei Esstischen mit Stühlen regelt
|
||||
**Unordnung**, wie schief die Stühle stehen, **Neu würfeln** zieht eine neue Anordnung (gleiche Zahl = gleiche Stühle). Die Zeichnung
|
||||
folgt dem Detailgrad der Ansicht (grob, mittel, fein). Möbel liegen auf der Klasse 22, Sanitär auf 23, Fahrzeuge und
|
||||
Freiflächen auf 24 und lassen sich dort ausschalten; Möbel und Sanitär sparen den Bodenbelag aus. Im DXF-Export wird jedes
|
||||
|
||||
@@ -130,11 +130,13 @@ const COSTS: &[Col] = &[
|
||||
|
||||
/// [255] Baurecht-Nachweis.
|
||||
const SITE_PROOF: &[Col] = &[
|
||||
c("item", "siteProof.col.item", 4.6, false, true),
|
||||
c("allowed", "siteProof.col.allowed", 1.4, true, true),
|
||||
// Kurzer Kopf „Reserve“ (die lange Fassung „Reserve (+) / Überschr. (−)“ steht in der Panel-Tabelle): Köpfe und Zahlen passen
|
||||
// schon bei 100 mm Breite ohne „…“ (Test `baurecht_nachweis_tabelle`).
|
||||
c("item", "siteProof.col.item", 4.25, false, true),
|
||||
c("allowed", "siteProof.col.allowed", 1.5, true, true),
|
||||
c("actual", "siteProof.col.actual", 1.4, true, true),
|
||||
c("reserve", "siteProof.col.reserve", 1.8, true, true),
|
||||
c("ok", "siteProof.col.ok", 1.0, false, true),
|
||||
c("reserve", "siteProof.col.reserveShort", 1.5, true, true),
|
||||
c("ok", "siteProof.col.ok", 1.35, false, true),
|
||||
];
|
||||
|
||||
/// [158] Raumbuch-Spalten, die nur erscheinen, wenn ein Raum eine Dachschräge hat.
|
||||
@@ -896,4 +898,20 @@ mod tests {
|
||||
assert_eq!(serde_json::to_value(LayoutTableSource::SiteProof).unwrap(), "siteProof");
|
||||
assert!(catalog_json()["sources"]["siteProof"].as_array().unwrap().len() == 5);
|
||||
}
|
||||
|
||||
/// [255] Köpfe der Baurecht-Tabelle werden auch bei schmalem Rahmen (100 mm) nicht mit „…“ gekürzt (de und en, 8 pt fett).
|
||||
#[test]
|
||||
fn baurecht_tabelle_koepfe_passen() {
|
||||
for heads in [["Prüfgrösse", "Zulässig", "Projekt", "Reserve", "Erfüllt"], ["Item", "Allowed", "Project", "Reserve", "Met"]] {
|
||||
let mut t = table("n", None);
|
||||
t.source = LayoutTableSource::SiteProof;
|
||||
t.width_mm = 100.0;
|
||||
let p = project(0, vec![t]);
|
||||
let lb = Labels::parse(&json!({"siteProof.col.item": heads[0], "siteProof.col.allowed": heads[1], "siteProof.col.actual": heads[2], "siteProof.col.reserveShort": heads[3], "siteProof.col.ok": heads[4]}));
|
||||
let tx = texts(&render(&p, &p.layouts.as_ref().unwrap()[0], &lb)[0]);
|
||||
for h in heads {
|
||||
assert!(tx.contains(&h.to_string()), "Kopf {h} gekürzt: {tx:?}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+81
-7
@@ -4194,6 +4194,79 @@ export const de = {
|
||||
"anonymity.kind.file": "Dateiname",
|
||||
"anonymity.kind.email": "E-Mail",
|
||||
"anonymity.kind.phone": "Telefon",
|
||||
"anonymity.area.materials": "Materialien",
|
||||
"anonymity.item.rooms": "Raum",
|
||||
"anonymity.item.drawingLevels": "Geschoss",
|
||||
"anonymity.item.layers": "Ebene / Klasse",
|
||||
"anonymity.item.groups": "Gruppe",
|
||||
"anonymity.item.blockDefs": "Block",
|
||||
"anonymity.item.layouts": "Blatt",
|
||||
"anonymity.item.masterLayouts": "Masterlayout",
|
||||
"anonymity.item.drawings2d": "Zeichnung",
|
||||
"anonymity.item.walls": "Wand",
|
||||
"anonymity.item.openings": "Öffnung",
|
||||
"anonymity.item.stairs": "Treppe",
|
||||
"anonymity.item.columns": "Stütze",
|
||||
"anonymity.item.context": "Kontext",
|
||||
"anonymity.item.extrudedSolids": "Körper",
|
||||
"anonymity.item.viewSnapshots": "Ausschnitt",
|
||||
"anonymity.item.viewSnapshotFolders": "Ausschnitt-Ordner",
|
||||
"anonymity.item.viewTemplates": "Ansichtsvorlage",
|
||||
"anonymity.item.layoutFolders": "Layout-Ordner",
|
||||
"anonymity.item.publishSets": "Publikationssatz",
|
||||
"anonymity.item.roomProgram": "Raumprogramm",
|
||||
"anonymity.item.export": "Ausgabe",
|
||||
"anonymity.item.cameras": "Kamera",
|
||||
"anonymity.item.components": "Bauteil",
|
||||
"anonymity.item.wallTypes": "Wandtyp",
|
||||
"anonymity.item.textStyles": "Textstil",
|
||||
"anonymity.item.ceilings": "Decke",
|
||||
"anonymity.item.roofs": "Dach",
|
||||
"anonymity.item.trees": "Baum",
|
||||
"anonymity.item.hatches": "Schraffur",
|
||||
"anonymity.item.lineStyles": "Linienstil",
|
||||
"anonymity.item.materials": "Material",
|
||||
"anonymity.field.name": "Name",
|
||||
"anonymity.field.text": "Text",
|
||||
"anonymity.field.note": "Notiz",
|
||||
"anonymity.field.notes": "Notizen",
|
||||
"anonymity.field.label": "Beschriftung",
|
||||
"anonymity.field.title": "Titel",
|
||||
"anonymity.field.description": "Beschreibung",
|
||||
"anonymity.field.comment": "Kommentar",
|
||||
"anonymity.field.sheetName": "Blattname",
|
||||
"anonymity.field.projectName": "Projektname",
|
||||
"anonymity.field.projectNumber": "Projektnummer",
|
||||
"anonymity.field.author": "Bearbeiter:in",
|
||||
"anonymity.field.number": "Nummer",
|
||||
"anonymity.field.planNumber": "Plannummer",
|
||||
"anonymity.field.revision": "Revision",
|
||||
"anonymity.field.date": "Datum",
|
||||
"anonymity.field.mark": "Kennzeichen",
|
||||
"anonymity.field.abbrev": "Kürzel",
|
||||
"anonymity.field.family": "Familie",
|
||||
"anonymity.field.code": "Code",
|
||||
"anonymity.field.group": "Gruppe",
|
||||
"anonymity.field.layer": "Ebene",
|
||||
"anonymity.field.value": "Wert",
|
||||
"anonymity.field.setName": "Satzname",
|
||||
"anonymity.field.namePattern": "Namensmuster",
|
||||
"anonymity.field.identifiers": "Angaben",
|
||||
"anonymity.field.keyword": "Kennwort",
|
||||
"anonymity.field.source": "Quelle",
|
||||
"anonymity.field.template": "Vorlage",
|
||||
"anonymity.field.folder": "Ordner",
|
||||
"anonymity.field.floorFinish": "Bodenbelag",
|
||||
"anonymity.field.ceilingFinish": "Deckenbelag",
|
||||
"anonymity.field.wallFinish": "Wandbelag",
|
||||
"anonymity.field.floorBuildUp": "Bodenaufbau",
|
||||
"anonymity.field.species": "Art",
|
||||
"anonymity.field.format": "Format",
|
||||
"anonymity.field.fileName": "Dateiname",
|
||||
"anonymity.field.scale": "Massstab",
|
||||
"anonymity.part.titleBlock": "Titelblock",
|
||||
"anonymity.part.images": "Bild",
|
||||
"anonymity.part.index": "Eintrag",
|
||||
"publish.competition.identifiers": "Weitere Angaben, die nicht vorkommen dürfen",
|
||||
"publish.competition.identifiersHint": "Büro, Namen, E-Mail, Telefon, getrennt durch Komma. Vor dem Export der anonymen Abgabe im Freitext gesucht.",
|
||||
"publish.competition.keyword": "Kennwort",
|
||||
@@ -4213,6 +4286,7 @@ export const de = {
|
||||
"siteProof.col.allowed": "Zulässig",
|
||||
"siteProof.col.actual": "Projekt",
|
||||
"siteProof.col.reserve": "Reserve (+) / Überschr. (−)",
|
||||
"siteProof.col.reserveShort": "Reserve",
|
||||
"siteProof.col.ok": "Erfüllt",
|
||||
"siteProof.col.basis": "Grundlage",
|
||||
"siteProof.col.value": "Wert",
|
||||
@@ -4357,18 +4431,18 @@ export const de = {
|
||||
"lib.o.wc-wand": "WC wandhängend",
|
||||
"lib.o.wc-kasten": "WC mit Spülkasten",
|
||||
"lib.o.lavabo": "Lavabo",
|
||||
"lib.o.handwaschbecken": "Handwaschbecken",
|
||||
"lib.o.handwaschbecken": "Handwasch\u00ADbecken",
|
||||
"lib.o.doppellavabo": "Doppellavabo",
|
||||
"lib.o.dusche-90": "Dusche 90×90",
|
||||
"lib.o.dusche-80x120": "Dusche 80×120",
|
||||
"lib.o.wanne-170": "Badewanne 170×75",
|
||||
"lib.o.wanne-180": "Badewanne 180×80",
|
||||
"lib.o.urinal": "Urinal",
|
||||
"lib.o.waschmaschine": "Waschmaschine / Tumbler",
|
||||
"lib.o.waschmaschine": "Wasch\u00ADmaschine / Tumbler",
|
||||
"lib.o.kueche-unterbau": "Unterbau 55",
|
||||
"lib.o.kueche-spuele": "Spüle 55",
|
||||
"lib.o.kueche-kochfeld": "Kochfeld 55",
|
||||
"lib.o.kueche-geschirrspueler": "Geschirrspüler 55",
|
||||
"lib.o.kueche-geschirrspueler": "Geschirr\u00ADspüler 55",
|
||||
"lib.o.kueche-kuehlschrank": "Kühlschrank 55",
|
||||
"lib.o.kueche-hochschrank": "Hochschrank 55",
|
||||
"lib.o.kueche-zeile": "Küchenzeile (55er-Module)",
|
||||
@@ -4393,9 +4467,9 @@ export const de = {
|
||||
"lib.o.bett-180": "Bett 180×200",
|
||||
"lib.o.kinderbett": "Kinderbett 70×140",
|
||||
"lib.o.nachttisch": "Nachttisch",
|
||||
"lib.o.schrank-50": "Einbauschrank 50",
|
||||
"lib.o.schrank-60": "Einbauschrank 60",
|
||||
"lib.o.schrank-100": "Einbauschrank 100",
|
||||
"lib.o.schrank-50": "Einbau\u00ADschrank 50",
|
||||
"lib.o.schrank-60": "Einbau\u00ADschrank 60",
|
||||
"lib.o.schrank-100": "Einbau\u00ADschrank 100",
|
||||
"lib.o.garderobe": "Garderobe T 35",
|
||||
"lib.o.regal": "Regal T 35",
|
||||
"lib.o.auto": "Auto mit Parkfeld",
|
||||
@@ -4420,7 +4494,7 @@ export const de = {
|
||||
"lib.empty": "Keine Objekte verfügbar.",
|
||||
"lib.params": "Vorgaben",
|
||||
"lib.reroll": "Neu würfeln",
|
||||
"lib.section": "Objekt aus Bibliothek",
|
||||
"lib.section": "Objekt",
|
||||
"lib.unknown": "Unbekanntes Objekt",
|
||||
"cmd.libobj.label": "Objekt setzen",
|
||||
"cmd.libobj.point": "Einfügepunkt:",
|
||||
|
||||
+103
-29
@@ -4144,34 +4144,34 @@ export const en: Record<TranslationKey, string> = {
|
||||
"anonymity.proceed": "Export anyway",
|
||||
"anonymity.area.hatches": "Hatches",
|
||||
"anonymity.area.lineStyles": "Line styles",
|
||||
"anonymity.area.rooms": "rooms",
|
||||
"anonymity.area.drawingLevels": "floors",
|
||||
"anonymity.area.layers": "layers / classes",
|
||||
"anonymity.area.groups": "groups",
|
||||
"anonymity.area.blockDefs": "blocks",
|
||||
"anonymity.area.layouts": "layouts / sheets",
|
||||
"anonymity.area.masterLayouts": "master layouts",
|
||||
"anonymity.area.drawings2d": "2D drawing / text",
|
||||
"anonymity.area.walls": "walls",
|
||||
"anonymity.area.openings": "openings",
|
||||
"anonymity.area.stairs": "stairs",
|
||||
"anonymity.area.columns": "columns",
|
||||
"anonymity.area.context": "context",
|
||||
"anonymity.area.extrudedSolids": "solids",
|
||||
"anonymity.area.viewSnapshots": "view snapshots",
|
||||
"anonymity.area.viewSnapshotFolders": "snapshot folders",
|
||||
"anonymity.area.viewTemplates": "view templates",
|
||||
"anonymity.area.layoutFolders": "layout folders",
|
||||
"anonymity.area.publishSets": "publish sets",
|
||||
"anonymity.area.roomProgram": "room program",
|
||||
"anonymity.area.export": "output",
|
||||
"anonymity.area.cameras": "cameras",
|
||||
"anonymity.area.components": "components",
|
||||
"anonymity.area.wallTypes": "wall types",
|
||||
"anonymity.area.textStyles": "text styles",
|
||||
"anonymity.area.ceilings": "ceilings",
|
||||
"anonymity.area.roofs": "roofs",
|
||||
"anonymity.area.trees": "trees",
|
||||
"anonymity.area.rooms": "Rooms",
|
||||
"anonymity.area.drawingLevels": "Floors",
|
||||
"anonymity.area.layers": "Layers / classes",
|
||||
"anonymity.area.groups": "Groups",
|
||||
"anonymity.area.blockDefs": "Blocks",
|
||||
"anonymity.area.layouts": "Layouts / sheets",
|
||||
"anonymity.area.masterLayouts": "Master layouts",
|
||||
"anonymity.area.drawings2d": "2D drawings / text",
|
||||
"anonymity.area.walls": "Walls",
|
||||
"anonymity.area.openings": "Openings",
|
||||
"anonymity.area.stairs": "Stairs",
|
||||
"anonymity.area.columns": "Columns",
|
||||
"anonymity.area.context": "Context",
|
||||
"anonymity.area.extrudedSolids": "Solids",
|
||||
"anonymity.area.viewSnapshots": "View snapshots",
|
||||
"anonymity.area.viewSnapshotFolders": "Snapshot folders",
|
||||
"anonymity.area.viewTemplates": "View templates",
|
||||
"anonymity.area.layoutFolders": "Layout folders",
|
||||
"anonymity.area.publishSets": "Publish sets",
|
||||
"anonymity.area.roomProgram": "Room programme",
|
||||
"anonymity.area.export": "Output",
|
||||
"anonymity.area.cameras": "Cameras",
|
||||
"anonymity.area.components": "Components",
|
||||
"anonymity.area.wallTypes": "Wall types",
|
||||
"anonymity.area.textStyles": "Text styles",
|
||||
"anonymity.area.ceilings": "Ceilings",
|
||||
"anonymity.area.roofs": "Roofs",
|
||||
"anonymity.area.trees": "Trees",
|
||||
"anonymity.kind.name": "project name",
|
||||
"anonymity.kind.number": "project number",
|
||||
"anonymity.kind.titleBlock": "office / author",
|
||||
@@ -4180,6 +4180,79 @@ export const en: Record<TranslationKey, string> = {
|
||||
"anonymity.kind.file": "file name",
|
||||
"anonymity.kind.email": "e-mail",
|
||||
"anonymity.kind.phone": "phone",
|
||||
"anonymity.area.materials": "Materials",
|
||||
"anonymity.item.rooms": "Room",
|
||||
"anonymity.item.drawingLevels": "Level",
|
||||
"anonymity.item.layers": "Layer / class",
|
||||
"anonymity.item.groups": "Group",
|
||||
"anonymity.item.blockDefs": "Block",
|
||||
"anonymity.item.layouts": "Sheet",
|
||||
"anonymity.item.masterLayouts": "Master layout",
|
||||
"anonymity.item.drawings2d": "Drawing",
|
||||
"anonymity.item.walls": "Wall",
|
||||
"anonymity.item.openings": "Opening",
|
||||
"anonymity.item.stairs": "Stair",
|
||||
"anonymity.item.columns": "Column",
|
||||
"anonymity.item.context": "Context",
|
||||
"anonymity.item.extrudedSolids": "Solid",
|
||||
"anonymity.item.viewSnapshots": "View snapshot",
|
||||
"anonymity.item.viewSnapshotFolders": "Snapshot folder",
|
||||
"anonymity.item.viewTemplates": "View template",
|
||||
"anonymity.item.layoutFolders": "Layout folder",
|
||||
"anonymity.item.publishSets": "Publish set",
|
||||
"anonymity.item.roomProgram": "Room program",
|
||||
"anonymity.item.export": "Output",
|
||||
"anonymity.item.cameras": "Camera",
|
||||
"anonymity.item.components": "Component",
|
||||
"anonymity.item.wallTypes": "Wall type",
|
||||
"anonymity.item.textStyles": "Text style",
|
||||
"anonymity.item.ceilings": "Ceiling",
|
||||
"anonymity.item.roofs": "Roof",
|
||||
"anonymity.item.trees": "Tree",
|
||||
"anonymity.item.hatches": "Hatch",
|
||||
"anonymity.item.lineStyles": "Line style",
|
||||
"anonymity.item.materials": "Material",
|
||||
"anonymity.field.name": "Name",
|
||||
"anonymity.field.text": "Text",
|
||||
"anonymity.field.note": "Note",
|
||||
"anonymity.field.notes": "Notes",
|
||||
"anonymity.field.label": "Label",
|
||||
"anonymity.field.title": "Title",
|
||||
"anonymity.field.description": "Description",
|
||||
"anonymity.field.comment": "Comment",
|
||||
"anonymity.field.sheetName": "Sheet name",
|
||||
"anonymity.field.projectName": "Project name",
|
||||
"anonymity.field.projectNumber": "Project number",
|
||||
"anonymity.field.author": "Author",
|
||||
"anonymity.field.number": "Number",
|
||||
"anonymity.field.planNumber": "Plan number",
|
||||
"anonymity.field.revision": "Revision",
|
||||
"anonymity.field.date": "Date",
|
||||
"anonymity.field.mark": "Mark",
|
||||
"anonymity.field.abbrev": "Abbreviation",
|
||||
"anonymity.field.family": "Family",
|
||||
"anonymity.field.code": "Code",
|
||||
"anonymity.field.group": "Group",
|
||||
"anonymity.field.layer": "Layer",
|
||||
"anonymity.field.value": "Value",
|
||||
"anonymity.field.setName": "Set name",
|
||||
"anonymity.field.namePattern": "Name pattern",
|
||||
"anonymity.field.identifiers": "Identifiers",
|
||||
"anonymity.field.keyword": "Keyword",
|
||||
"anonymity.field.source": "Source",
|
||||
"anonymity.field.template": "Template",
|
||||
"anonymity.field.folder": "Folder",
|
||||
"anonymity.field.floorFinish": "Floor finish",
|
||||
"anonymity.field.ceilingFinish": "Ceiling finish",
|
||||
"anonymity.field.wallFinish": "Wall finish",
|
||||
"anonymity.field.floorBuildUp": "Floor build-up",
|
||||
"anonymity.field.species": "Species",
|
||||
"anonymity.field.format": "Format",
|
||||
"anonymity.field.fileName": "File name",
|
||||
"anonymity.field.scale": "Scale",
|
||||
"anonymity.part.titleBlock": "Title block",
|
||||
"anonymity.part.images": "Image",
|
||||
"anonymity.part.index": "Entry",
|
||||
"publish.competition.identifiers": "Further details that must not appear",
|
||||
"publish.competition.identifiersHint": "Office, names, e-mail, phone, separated by commas. Searched in free text before an anonymous submission is exported.",
|
||||
"publish.competition.keyword": "Keyword",
|
||||
@@ -4199,6 +4272,7 @@ export const en: Record<TranslationKey, string> = {
|
||||
"siteProof.col.allowed": "Allowed",
|
||||
"siteProof.col.actual": "Project",
|
||||
"siteProof.col.reserve": "Reserve (+) / excess (−)",
|
||||
"siteProof.col.reserveShort": "Reserve",
|
||||
"siteProof.col.ok": "Met",
|
||||
"siteProof.col.basis": "Basis",
|
||||
"siteProof.col.value": "Value",
|
||||
@@ -4406,7 +4480,7 @@ export const en: Record<TranslationKey, string> = {
|
||||
"lib.empty": "No objects available.",
|
||||
"lib.params": "Defaults",
|
||||
"lib.reroll": "Re-roll",
|
||||
"lib.section": "Library object",
|
||||
"lib.section": "Object",
|
||||
"lib.unknown": "Unknown object",
|
||||
"cmd.libobj.label": "Place object",
|
||||
"cmd.libobj.point": "Insertion point:",
|
||||
|
||||
@@ -38,6 +38,12 @@ declare global {
|
||||
}
|
||||
}
|
||||
window.__i18n = { getLanguage, setLanguage };
|
||||
// Nur mit `?dossierTest&lang=en`: Sprache VOR dem ersten Render setzen (UI-Review; gibt noch keinen Umschalter).
|
||||
{
|
||||
const q = new URLSearchParams(window.location.search);
|
||||
const l = q.get("lang");
|
||||
if (q.has("dossierTest") && (l === "de" || l === "en")) setLanguage(l);
|
||||
}
|
||||
|
||||
// ── Native-App-Verhalten (kein Browser-Standard) ─────────────────────────────
|
||||
// Die App soll sich wie ein natives Programm anfühlen. Diese globalen Hooks
|
||||
|
||||
@@ -57,7 +57,7 @@ export function AreaTableSection() {
|
||||
<div key={si} className="area-block">
|
||||
<div className="area-heading">{s.heading}</div>
|
||||
<div className="area-scroll">
|
||||
<table className="area-table">
|
||||
<table className={s.columns.length > 6 ? "area-table wide" : "area-table"}>
|
||||
<thead>
|
||||
<tr>
|
||||
{s.columns.map((c, i) => (
|
||||
@@ -72,9 +72,12 @@ export function AreaTableSection() {
|
||||
<tr key={ri} className={r.total ? "total" : ""}>
|
||||
{r.cells.map((c, ci) =>
|
||||
typeof c === "string" ? (
|
||||
<td key={ci}>{c}</td>
|
||||
// Kurze Textzellen in Zahlenspalten (Strich, ja/nein) stehen wie die Zahlen rechts.
|
||||
<td key={ci} data-label={ci > 0 ? s.columns[ci] : undefined} className={ci > 0 && c.length <= 4 ? "num" : undefined}>
|
||||
{c}
|
||||
</td>
|
||||
) : (
|
||||
<td key={ci} className="num">
|
||||
<td key={ci} data-label={ci > 0 ? s.columns[ci] : undefined} className="num">
|
||||
{c.n === null ? "–" : c.n.toFixed(c.d)}
|
||||
</td>
|
||||
),
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// mit Vorschau-Symbol je Objekt. Klick wählt das Objekt und startet den Befehl `libobj` (Einfügepunkt klicken,
|
||||
// R = drehen, M = spiegeln). Der Katalog kommt aus dem Rust-Kern; die Vorschau zeichnet der Kern (grob).
|
||||
|
||||
import { useMemo } from "react";
|
||||
import { useMemo, useState } from "react";
|
||||
import { t } from "../i18n";
|
||||
import type { TranslationKey } from "../i18n";
|
||||
import { usePanelHostAction } from "./host";
|
||||
@@ -43,7 +43,31 @@ function Preview({ def }: { def: LibObjectDef }) {
|
||||
);
|
||||
}
|
||||
|
||||
const OPEN_KEY = "cad.objlib.open";
|
||||
|
||||
/** Gemerkter Zustand der Gruppen (offen/zu) je Gruppen-Schlüssel; leer, wenn nichts gespeichert ist. */
|
||||
function loadOpen(): Record<string, boolean> {
|
||||
try {
|
||||
const raw = localStorage.getItem(OPEN_KEY);
|
||||
const v: unknown = raw ? JSON.parse(raw) : null;
|
||||
return v && typeof v === "object" ? (v as Record<string, boolean>) : {};
|
||||
} catch {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
export function ObjectLibraryPanel() {
|
||||
const [open, setOpen] = useState<Record<string, boolean>>(loadOpen);
|
||||
const setGroupOpen = (g: string, v: boolean) =>
|
||||
setOpen((o) => {
|
||||
const next = { ...o, [g]: v };
|
||||
try {
|
||||
localStorage.setItem(OPEN_KEY, JSON.stringify(next));
|
||||
} catch {
|
||||
/* Speicher gesperrt: der Zustand gilt nur für diese Sitzung */
|
||||
}
|
||||
return next;
|
||||
});
|
||||
const onRunCommand = usePanelHostAction("onRunCommand");
|
||||
const catalog = useMemo(() => libCatalog(), []);
|
||||
const groups = useMemo(() => libGroups(), []);
|
||||
@@ -60,7 +84,7 @@ export function ObjectLibraryPanel() {
|
||||
<div className="objlib-panel" style={{ overflowY: "auto", padding: "6px 8px" }}>
|
||||
<div style={{ fontSize: 11, color: "var(--muted)", marginBottom: 6 }}>{t("lib.hint")}</div>
|
||||
{groups.map((g) => (
|
||||
<details key={g} open={g === groups[0]} style={{ marginBottom: 4 }}>
|
||||
<details key={g} open={open[g] ?? g === groups[0]} onToggle={(e) => { const v = e.currentTarget.open; if (v !== (open[g] ?? g === groups[0])) setGroupOpen(g, v); }} style={{ marginBottom: 4 }}>
|
||||
<summary style={{ cursor: "pointer", fontSize: 12, fontWeight: 600, padding: "3px 0" }}>{t(`lib.g.${g}` as TranslationKey)}</summary>
|
||||
<div style={{ display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(72px, 1fr))", gap: 4, padding: "4px 0" }}>
|
||||
{catalog.objects
|
||||
@@ -71,8 +95,8 @@ export function ObjectLibraryPanel() {
|
||||
<button
|
||||
key={o.id}
|
||||
type="button"
|
||||
title={name}
|
||||
aria-label={name}
|
||||
title={name.replace(/\u00AD/g, "")}
|
||||
aria-label={name.replace(/\u00AD/g, "")}
|
||||
onClick={() => place(o)}
|
||||
style={{
|
||||
display: "flex",
|
||||
@@ -89,7 +113,7 @@ export function ObjectLibraryPanel() {
|
||||
}}
|
||||
>
|
||||
<Preview def={o} />
|
||||
<span style={{ fontSize: 10, lineHeight: 1.15, textAlign: "center", overflowWrap: "anywhere" }}>{name}</span>
|
||||
<span style={{ fontSize: 10, lineHeight: 1.15, textAlign: "center", overflowWrap: "break-word", hyphens: "manual" }}>{name}</span>
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
|
||||
@@ -46,7 +46,8 @@ import type {
|
||||
// v13 ([238]): rechts oben (Objekt-Info/Flächenbilanz) bekommt mehr Höhe: Gewichte 1,6 : 1 statt 1 : 1,5 (die
|
||||
// Flächenbilanz mit Raumprogramm war nur ~300 px hoch). Die Höhe merkt sich der Gruppen-Splitter (`resizeGroups`).
|
||||
// v14 ([253]): Objekt-Bibliothek ("object-library") als Tab neben den Werkzeugen links oben.
|
||||
export const LAYOUT_VERSION = 14;
|
||||
// v15 ([253]): links oben (Werkzeuge/Objekte) bekommt mehr Höhe: Gewichte 1,6 : 1 (die Objekt-Palette war im 900-px-Fenster nur ~270 px hoch).
|
||||
export const LAYOUT_VERSION = 15;
|
||||
|
||||
/** localStorage-Schlüssel des zuletzt benutzten Layouts. */
|
||||
const CURRENT_KEY = "cad.layout";
|
||||
@@ -74,7 +75,7 @@ const NAMED_PREFIX = "cad.layouts.";
|
||||
// der Attribute-Palette darunter (Vectorworks-Bild). Das Ribbon-Band bleibt als
|
||||
// Reiter erreichbar, ist aber nicht mehr der primäre Weg zu den Werkzeugen.
|
||||
const DEFAULT_LEFT_GROUPS: DockGroup[] = [
|
||||
{ tabs: ["tools", "object-library"], activeTab: "tools", weight: 1 },
|
||||
{ tabs: ["tools", "object-library"], activeTab: "tools", weight: 1.6 },
|
||||
{ tabs: ["attributes"], activeTab: "attributes", weight: 1 },
|
||||
];
|
||||
const DEFAULT_RIGHT_GROUPS: DockGroup[] = [
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { setLanguage } from "../i18n";
|
||||
import {
|
||||
comboFromEvent,
|
||||
comboMatches,
|
||||
@@ -158,6 +159,17 @@ describe("formatCombo", () => {
|
||||
expect(formatCombo("mod+shift+z", false)).toBe("Strg+Umschalt+Z");
|
||||
});
|
||||
|
||||
it("Englisch: Ctrl/Shift/Del statt Strg/Umschalt/Entf", () => {
|
||||
setLanguage("en");
|
||||
try {
|
||||
expect(formatCombo("mod+shift+Tab", false)).toBe("Ctrl+Shift+Tab");
|
||||
expect(formatCombo("Delete", false)).toBe("Del");
|
||||
expect(formatCombo("mod+shift+z", true)).toBe("⌘⇧Z");
|
||||
} finally {
|
||||
setLanguage("de");
|
||||
}
|
||||
});
|
||||
|
||||
it("Sondertasten bekommen ein lesbares Label", () => {
|
||||
expect(formatCombo("Delete", false)).toBe("Entf");
|
||||
});
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
// Sync) bleibt in App.tsx — exaktes Muster wie `commandAliasOverrides.ts`.
|
||||
// Bezeichner englisch, Kommentare deutsch (CONVENTIONS.md).
|
||||
|
||||
import { getLanguage } from "../i18n/translate";
|
||||
|
||||
export type ShortcutId =
|
||||
| "undo"
|
||||
| "redo"
|
||||
@@ -384,16 +386,20 @@ const KEY_DISPLAY_LABELS: Record<string, string> = {
|
||||
ArrowRight: "→",
|
||||
};
|
||||
|
||||
/** Englische Tastennamen, wo sie vom Deutschen abweichen (Rest wie `KEY_DISPLAY_LABELS`). */
|
||||
const KEY_DISPLAY_LABELS_EN: Record<string, string> = { Delete: "Del", Backspace: "Backspace", " ": "Space" };
|
||||
|
||||
/** Menschenlesbare Darstellung einer Kombination, plattformabhängig (⌘⇧Z auf macOS, Strg+Umschalt+Z sonst). */
|
||||
export function formatCombo(combo: string, mac: boolean = isMacPlatform()): string {
|
||||
const parts = combo.split("+");
|
||||
const key = parts[parts.length - 1];
|
||||
const mods = parts.slice(0, -1);
|
||||
const segs: string[] = [];
|
||||
if (mods.includes("mod")) segs.push(mac ? "⌘" : "Strg");
|
||||
if (mods.includes("shift")) segs.push(mac ? "⇧" : "Umschalt");
|
||||
const en = getLanguage() === "en";
|
||||
if (mods.includes("mod")) segs.push(mac ? "⌘" : en ? "Ctrl" : "Strg");
|
||||
if (mods.includes("shift")) segs.push(mac ? "⇧" : en ? "Shift" : "Umschalt");
|
||||
if (mods.includes("alt")) segs.push(mac ? "⌥" : "Alt");
|
||||
const keyLabel = KEY_DISPLAY_LABELS[key] ?? (key.length === 1 ? key.toUpperCase() : key);
|
||||
const keyLabel = (en ? KEY_DISPLAY_LABELS_EN[key] : undefined) ?? KEY_DISPLAY_LABELS[key] ?? (key.length === 1 ? key.toUpperCase() : key);
|
||||
segs.push(keyLabel);
|
||||
return segs.join(mac ? "" : "+");
|
||||
}
|
||||
+70
-1
@@ -4678,6 +4678,8 @@ body {
|
||||
position: fixed;
|
||||
z-index: 301;
|
||||
min-width: 240px;
|
||||
max-height: calc(100vh - 8px);
|
||||
overflow-y: auto;
|
||||
max-width: 320px;
|
||||
background: var(--ctx-surface);
|
||||
border: 1px solid var(--ctx-border);
|
||||
@@ -8875,7 +8877,7 @@ body {
|
||||
}
|
||||
.area-table th,
|
||||
.area-table td {
|
||||
padding: 2px 5px;
|
||||
padding: 2px 3px;
|
||||
white-space: nowrap;
|
||||
text-align: left;
|
||||
border-bottom: 1px solid var(--line);
|
||||
@@ -8883,6 +8885,23 @@ body {
|
||||
.area-table th {
|
||||
color: var(--ink-2);
|
||||
font-weight: 600;
|
||||
/* Köpfe und Textzellen dürfen umbrechen: die 340-px-Dock-Spalte zeigt so auch die Baurecht-Nachweis-Tabelle (5 Spalten) ganz. */
|
||||
white-space: normal;
|
||||
vertical-align: bottom;
|
||||
line-height: 1.2;
|
||||
}
|
||||
.area-table td:not(.num) {
|
||||
white-space: normal;
|
||||
hyphens: auto;
|
||||
overflow-wrap: anywhere; /* lange Wörter („Geschossflächenziffer“) brechen, statt die Tabelle über die Dock-Breite zu schieben */
|
||||
}
|
||||
.area-table td:first-child {
|
||||
min-width: 5em;
|
||||
}
|
||||
.area-table.wide td:first-child {
|
||||
min-width: 6.2em;
|
||||
overflow-wrap: normal;
|
||||
hyphens: manual;
|
||||
}
|
||||
.area-table .num {
|
||||
text-align: right;
|
||||
@@ -8891,6 +8910,56 @@ body {
|
||||
font-weight: 700;
|
||||
border-top: 1px solid var(--ink-2);
|
||||
}
|
||||
/* Breite Tabelle (> 6 Spalten) in schmaler Dock-Spalte: jede Zeile als Karte — Name oben, darunter die Kennwerte
|
||||
als Raster (5 Spalten) „Kopf über Zahl“ (data-label der Zelle). Kein waagrechtes Scrollen, nichts abgeschnitten. */
|
||||
.area-block {
|
||||
container-type: inline-size;
|
||||
}
|
||||
@container (max-width: 460px) {
|
||||
.area-table.wide,
|
||||
.area-table.wide tbody {
|
||||
display: block;
|
||||
}
|
||||
.area-table.wide thead {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0 0 0 0);
|
||||
}
|
||||
.area-table.wide tr {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(5, minmax(0, 1fr));
|
||||
column-gap: 4px;
|
||||
padding: 3px 0;
|
||||
border-bottom: 1px solid var(--line);
|
||||
}
|
||||
.area-table.wide td {
|
||||
border-bottom: 0;
|
||||
padding: 1px 3px;
|
||||
min-width: 0;
|
||||
}
|
||||
.area-table.wide tr.total td {
|
||||
border-top: 0;
|
||||
}
|
||||
.area-table.wide tr.total {
|
||||
border-top: 1px solid var(--ink-2);
|
||||
}
|
||||
.area-table.wide td:first-child {
|
||||
grid-column: 1 / -1;
|
||||
font-weight: 600;
|
||||
min-width: 0;
|
||||
}
|
||||
.area-table.wide td[data-label]::before {
|
||||
content: attr(data-label);
|
||||
display: block;
|
||||
font-size: 9px;
|
||||
line-height: 1.2;
|
||||
font-weight: 600;
|
||||
color: var(--ink-2);
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
.area-inputs {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -3,21 +3,35 @@
|
||||
// `LockConflictDialog` (kein window.confirm: im Tauri-WKWebView stumm). Zustand und Prüfung: `state/anonymityGate.ts`.
|
||||
|
||||
import { memo, useEffect, useSyncExternalStore } from "react";
|
||||
import { t } from "../i18n";
|
||||
import { getLanguage, t } from "../i18n";
|
||||
import { getAnonymityRequest, subscribeAnonymityRequest } from "../state/anonymityGate";
|
||||
import { useModalFocus } from "./modalFocus";
|
||||
import { anonymityPlaceParts } from "./anonymityPlace";
|
||||
|
||||
const AREA_KEYS = new Set([
|
||||
"rooms", "drawingLevels", "layers", "groups", "blockDefs", "layouts", "masterLayouts", "drawings2d", "walls", "openings",
|
||||
"stairs", "columns", "context", "extrudedSolids", "viewSnapshots", "viewSnapshotFolders", "viewTemplates", "layoutFolders",
|
||||
"publishSets", "roomProgram", "export", "cameras", "components", "wallTypes", "textStyles", "ceilings", "roofs", "trees",
|
||||
"hatches", "lineStyles",
|
||||
"hatches", "lineStyles", "materials",
|
||||
]);
|
||||
|
||||
function areaLabel(area: string): string {
|
||||
return AREA_KEYS.has(area) ? t(`anonymity.area.${area}`) : area;
|
||||
}
|
||||
|
||||
/** Fundstelle lesbar: Elementart „Name“ · Feld (z. B. Material „Wärmedämmung“ · Name). */
|
||||
function FindingPlace({ area, place }: { area: string; place: string }) {
|
||||
const p = anonymityPlaceParts(area, place);
|
||||
const q = (s: string) => (getLanguage() === "en" ? `\u201C${s}\u201D` : `\u201E${s}\u201C`);
|
||||
return (
|
||||
<>
|
||||
<b>{p.kind || areaLabel(area)}</b>
|
||||
{p.item ? <b> {q(p.item)}</b> : null}
|
||||
{p.field ? <span style={{ color: "var(--muted)" }}> · {p.field}</span> : null}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
const DialogBody = memo(function DialogBody() {
|
||||
const request = useSyncExternalStore(subscribeAnonymityRequest, getAnonymityRequest);
|
||||
const dialogRef = useModalFocus({});
|
||||
@@ -46,10 +60,9 @@ const DialogBody = memo(function DialogBody() {
|
||||
<ul data-testid="anonymity-findings" style={{ margin: "6px 0 0", paddingLeft: 18, maxHeight: 280, overflow: "auto", fontSize: 12 }}>
|
||||
{findings.map((f, i) => (
|
||||
<li key={i} data-kind={f.kind} style={{ marginBottom: 4 }}>
|
||||
<b>{areaLabel(f.area)}</b>
|
||||
{f.place ? <span style={{ color: "var(--muted)" }}> · {f.place}</span> : null}
|
||||
<FindingPlace area={f.area} place={f.place} />
|
||||
<div>
|
||||
„{f.text}" — {t(`anonymity.kind.${f.kind}`)}: <span className="mono">{f.term}</span>
|
||||
{getLanguage() === "en" ? `\u201C${f.text}\u201D` : `\u201E${f.text}\u201C`} — {t(`anonymity.kind.${f.kind}`)}: <span className="mono">{f.term}</span>
|
||||
</div>
|
||||
</li>
|
||||
))}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
// Fundstellen-Zerlegung des Anonymitäts-Dialogs: Pfade des Kerns -> Elementart, Name, Feld (de/en).
|
||||
import { afterEach, describe, expect, it } from "vitest";
|
||||
import { setLanguage } from "../i18n";
|
||||
import { anonymityPlaceParts } from "./anonymityPlace";
|
||||
|
||||
afterEach(() => setLanguage("de"));
|
||||
|
||||
describe("anonymityPlaceParts", () => {
|
||||
it("typische Pfade auf Deutsch", () => {
|
||||
setLanguage("de");
|
||||
expect(anonymityPlaceParts("materials", "Wärmedämmung.name")).toEqual({ kind: "Material", item: "Wärmedämmung", field: "Name" });
|
||||
expect(anonymityPlaceParts("rooms", "Küche.note")).toEqual({ kind: "Raum", item: "Küche", field: "Notiz" });
|
||||
expect(anonymityPlaceParts("drawingLevels", "EG.name")).toEqual({ kind: "Geschoss", item: "EG", field: "Name" });
|
||||
expect(anonymityPlaceParts("layers", "Wände.layers.Anna.name")).toEqual({ kind: "Ebene / Klasse", item: "Wände › Anna", field: "Name" });
|
||||
expect(anonymityPlaceParts("drawings2d", "0.text")).toEqual({ kind: "Zeichnung", item: "0", field: "Text" });
|
||||
expect(anonymityPlaceParts("layouts", "Plan.titleBlock.sheetName")).toEqual({ kind: "Blatt", item: "Plan", field: "Titelblock · Blattname" });
|
||||
expect(anonymityPlaceParts("layouts", "Plan.images.logo.png.name")).toEqual({ kind: "Blatt", item: "Plan › logo.png", field: "Name" });
|
||||
});
|
||||
it("Englisch, unbekanntes Feld und Zusatztext", () => {
|
||||
setLanguage("en");
|
||||
expect(anonymityPlaceParts("materials", "Insulation.name")).toEqual({ kind: "Material", item: "Insulation", field: "Name" });
|
||||
expect(anonymityPlaceParts("rooms", "Kitchen.weird")).toEqual({ kind: "Room", item: "Kitchen", field: "weird" });
|
||||
expect(anonymityPlaceParts("export", "Dateiname")).toEqual({ kind: "Output", item: "", field: "Dateiname" });
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,40 @@
|
||||
// Lesbare Fundstelle für den Anonymitäts-Dialog ([208]): der Kern liefert Bereich und Pfad
|
||||
// (`Wärmedämmung.name`, `Plan.titleBlock.sheetName`); hier werden Elementart, Name und Feld daraus.
|
||||
//
|
||||
// Bezeichner englisch, Kommentare deutsch.
|
||||
|
||||
import { t } from "../i18n";
|
||||
|
||||
export interface PlaceParts {
|
||||
/** Elementart im Singular („Material“), leer wenn unbekannt. */
|
||||
kind: string;
|
||||
/** Name des Elements (ggf. mit Unterelement: „Plan › logo.png“). */
|
||||
item: string;
|
||||
/** Feld („Name“, „Blattname“); bei Orten ohne Pfad (Zusatztexte wie „Dateiname“) der Ort selbst. */
|
||||
field: string;
|
||||
}
|
||||
|
||||
/** Zwischenschlüssel im Pfad, die ein Unterelement einleiten (Liste in einem Element). */
|
||||
const NESTED = ["images", "layers", "children", "items", "rows"];
|
||||
|
||||
/** Übersetzung, oder der Fallback, wenn es den Schlüssel nicht gibt (`t` gibt dann den Schlüssel zurück). */
|
||||
function tr(key: string, fallback: string): string {
|
||||
const s = t(key);
|
||||
return s === key ? fallback : s;
|
||||
}
|
||||
|
||||
/** Zerlegt Bereich und Pfad in Elementart, Elementname und Feld. */
|
||||
export function anonymityPlaceParts(area: string, place: string): PlaceParts {
|
||||
const kind = tr(`anonymity.item.${area}`, "");
|
||||
const cut = place.lastIndexOf(".");
|
||||
if (cut < 0) return { kind, item: "", field: place };
|
||||
const key = place.slice(cut + 1);
|
||||
let item = place.slice(0, cut);
|
||||
let field = /^\d+$/.test(key) ? `${tr("anonymity.part.index", "")} ${key}`.trim() : tr(`anonymity.field.${key}`, key);
|
||||
if (item.endsWith(".titleBlock")) {
|
||||
item = item.slice(0, -".titleBlock".length);
|
||||
field = `${tr("anonymity.part.titleBlock", "titleBlock")} · ${field}`;
|
||||
}
|
||||
for (const n of NESTED) item = item.split(`.${n}.`).join(" › ");
|
||||
return { kind, item, field };
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
//
|
||||
// Extrahiert aus App.tsx. Bezeichner englisch, Kommentare deutsch (CONVENTIONS.md).
|
||||
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
import React, { useEffect, useLayoutEffect, useRef, useState } from "react";
|
||||
import { t } from "../i18n";
|
||||
|
||||
export function InlineEditor({
|
||||
@@ -23,16 +23,27 @@ export function InlineEditor({
|
||||
const ref = useRef<HTMLDivElement>(null);
|
||||
// An die Viewport-Ränder klemmen (wie das Kontextmenü).
|
||||
const [pos, setPos] = useState({ x, y });
|
||||
useEffect(() => {
|
||||
// Auch nach dem Aufbau neu klemmen: Felder (z. B. Füllung) wachsen den Editor erst nach der ersten Messung.
|
||||
useLayoutEffect(() => {
|
||||
const el = ref.current;
|
||||
if (!el) return;
|
||||
const r = el.getBoundingClientRect();
|
||||
let nx = x;
|
||||
let ny = y;
|
||||
if (nx + r.width > window.innerWidth - 4) nx = window.innerWidth - r.width - 4;
|
||||
if (ny + r.height > window.innerHeight - 4)
|
||||
ny = window.innerHeight - r.height - 4;
|
||||
setPos({ x: Math.max(4, nx), y: Math.max(4, ny) });
|
||||
const clamp = () => {
|
||||
// Layout-Mass (offsetWidth), nicht getBoundingClientRect: die Einblend-Animation skaliert und verfälscht die Messung.
|
||||
const nx = Math.min(x, window.innerWidth - el.offsetWidth - 4);
|
||||
const ny = Math.min(y, window.innerHeight - el.offsetHeight - 4);
|
||||
setPos((p) => {
|
||||
const q = { x: Math.max(4, nx), y: Math.max(4, ny) };
|
||||
return p.x === q.x && p.y === q.y ? p : q;
|
||||
});
|
||||
};
|
||||
clamp();
|
||||
const ro = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(clamp);
|
||||
ro?.observe(el);
|
||||
window.addEventListener("resize", clamp);
|
||||
return () => {
|
||||
ro?.disconnect();
|
||||
window.removeEventListener("resize", clamp);
|
||||
};
|
||||
}, [x, y]);
|
||||
// Schließen bei Außenklick / Esc.
|
||||
useEffect(() => {
|
||||
|
||||
Reference in new issue
Block a user