[208] Anonymitäts-Prüfung des Freitexts vor dem Export einer anonymen Abgabe

Kern (competition.rs, Bindung anonymity_findings) sucht Projektname, -nummer, Titelblock-Büro/-Bearbeiter, Adresse,
Dateiname und die neue Liste competition.identifiers sowie E-Mail/Telefon in allen Texten des Projekts
(ganze Wörter, Umlaute/Gross-Klein tolerant, Mindestlänge, allgemeine Wörter ausgenommen). Dialog mit
Trotzdem exportieren / Abbrechen vor PDF/SVG/DXF, Direkt-Export und Publikationssatz. Kopfdaten waren schon leer.
This commit is contained in:
Claude committed 2026-11-14 08:10:25 +00:00
1 parent 9a796ac7d6
commit 1a14375690
20 files changed
+838 -7

No files matched your search

+9
View File
@@ -23,6 +23,7 @@ import { beginBusy, endBusy } from "./busyStore";
import type { ImportDecision, PdfImportOptions } from "../ui/ImportDialog";
import { isPdfFile, pdfImport, readPdfVector, type PdfRead } from "../io/pdfVector";
import { exportProjectName } from "../export/competitionIdentity";
import { confirmAnonymousExport, setAnonymityProjectFileName } from "./anonymityGate";
import { exportScheduleCsv } from "../export/exportSchedule";
import { exportIfcSpf, type IfcExportOptions } from "../export/exportIfc";
import { loadFileio } from "../engine/fileioWasm";
@@ -398,6 +399,7 @@ export function useProjectFileActions(
const json = serializeProject(project, uiStateForSave());
return saveProjectFile(json, project.name, (path) => {
savePathRef.current = path;
setAnonymityProjectFileName(path);
addRecentProject(path, project.name || "modell");
}, asNew ? null : savePathRef.current).then(
(saved) => {
@@ -518,6 +520,7 @@ export function useProjectFileActions(
lastSavedProjectRef.current = loaded;
openedProjectPathRef.current = path;
savePathRef.current = path;
setAnonymityProjectFileName(path);
projectLockOwnedRef.current = lockOwned;
addRecentProject(path, loaded.name || "modell");
offerRecovery(path);
@@ -578,6 +581,12 @@ export function useProjectFileActions(
// gewählten Dateinamen aus. Erzeugung aus dem jeweiligen reinen Kern, Download
// über den robusten Helfer.
const runExport = (format: ExportSaveFormat, filename: string, ifcOptions?: IfcExportOptions) => {
// [208] Anonyme Abgabe: Freitext vorher prüfen (Dialog), erst dann schreiben.
void confirmAnonymousExport(getState().project, [filename]).then((ok) => {
if (ok) runExportChecked(format, filename, ifcOptions);
});
};
const runExportChecked = (format: ExportSaveFormat, filename: string, ifcOptions?: IfcExportOptions) => {
const project = getState().project;
switch (format) {
case "csv":