From e9cda1c02f515b21da0f1e0639e06d849ed6099e Mon Sep 17 00:00:00 2001 From: muena Date: Sun, 27 Sep 2026 08:22:06 +0200 Subject: [PATCH] fix: expose pseudonymized copy location in Raycast --- src/pseudonymize-project-files.tsx | 21 +++++++++++++++++++-- src/restore-project-files.tsx | 6 ++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/pseudonymize-project-files.tsx b/src/pseudonymize-project-files.tsx index 404eedd..0bb6ce9 100644 --- a/src/pseudonymize-project-files.tsx +++ b/src/pseudonymize-project-files.tsx @@ -218,6 +218,7 @@ function HitReview(props: { root: string; rules: ProjectRule[]; whitelist: Proje const [stage, setStage] = useState<"selection" | "merge">("selection"); const [personMerges, setPersonMerges] = useState>({}); const [busy, setBusy] = useState(false); + const [completed, setCompleted] = useState<{ directory: string; inPlace: boolean; files: number } | null>(null); const accepted = useMemo(() => new Set(groups.filter((group) => selectedGroups.has(group.key)) .flatMap((group) => group.hits.map((hit) => hit.id))), [groups, selectedGroups]); const selectedOccurrences = accepted.size; @@ -351,6 +352,9 @@ function HitReview(props: { root: string; rules: ProjectRule[]; whitelist: Proje } toast.style = Toast.Style.Success; toast.title = inPlace ? `${replacements.length} Dateien ersetzt` : `${run.files.length} Kopien erstellt`; + toast.message = inPlace ? "Die Sicherung ist im Raycast-Datenordner gespeichert." + : "Die Kopien sind im Raycast-Datenordner gespeichert."; + setCompleted({ directory: join(directory, inPlace ? "backup" : "files"), inPlace, files: run.files.length }); await showInFinder(inPlace ? props.root : join(directory, "files")).catch(() => undefined); } catch (error) { if (directory && !persisted) await fs.rm(directory, { recursive: true, force: true }); @@ -360,6 +364,18 @@ function HitReview(props: { root: string; rules: ProjectRule[]; whitelist: Proje } finally { setBusy(false); } } + if (completed) return + + showInFinder(completed.directory)} /> + + } /> + ; + if (stage === "merge") return @@ -415,7 +431,8 @@ function HitReview(props: { root: string; rules: ProjectRule[]; whitelist: Proje icon={{ source: selectedGroups.has(group.key) ? Icon.CheckCircle : Icon.Circle, tintColor: selectedGroups.has(group.key) ? Color.Green : Color.SecondaryText }} title={group.original} subtitle={`→ ${group.placeholder}`} - accessories={[{ text: `${group.hits.length} Vorkommen` }]} + accessories={[{ text: `${group.hits.length} Vorkommen` }, + ...(group.hits.some((hit) => hit.source === "Kommentarautor") ? [{ text: "Word-Kommentator" }] : [])]} keywords={[type, labelForType(type)]} actions={ + onChange={setSelectedTypes} info="Die Auswahl wird beim Prüfen für diesen Projektordner gespeichert. Word-Kommentatoren werden nur mit der Kategorie Personen maskiert. Bei neuen Projekten sind Orte zunächst abgewählt."> {availableTypes.map((type) => )} diff --git a/src/restore-project-files.tsx b/src/restore-project-files.tsx index a3a3eec..49d25a2 100644 --- a/src/restore-project-files.tsx +++ b/src/restore-project-files.tsx @@ -198,6 +198,9 @@ function ProjectHistory(props: { projectName: string; entries: SavedRun[] }) { title={new Date(run.createdAt).toLocaleString("de-AT")} subtitle={`${run.files.length} Dateien`} actions={ + showInFinder(join(directory, "files"))} /> + push()} /> } />)} @@ -229,6 +232,9 @@ export default function Command() { accessories={[{ text: `${run.files.length} Dateien` }, { text: new Date(run.createdAt).toLocaleString("de-AT") }, ...(entries.length > 1 ? [{ text: `${entries.length} Stände` }] : [])]} actions={ + showInFinder(join(directory, "files"))} /> + push()} />