feat: publish Velum copies beside project folder

This commit is contained in:
muena
2026-09-27 08:58:40 +02:00
parent 23af4993db
commit ec327a5220
6 changed files with 95 additions and 21 deletions

View File

@@ -4,7 +4,7 @@ import { homedir } from "node:os";
import { basename, dirname, join } from "node:path";
import { useEffect, useState } from "react";
import { depseudonymizeDocument } from "./velum";
import { canonicalProjectPath, isRestorableDocument, listAllRuns, resolveWithin, restorePath, restoreText } from "./lib/velum-project";
import { canonicalProjectPath, isRestorableDocument, listAllRuns, resolveWithin, restorePath, restoreText, runCopiesPath } from "./lib/velum-project";
import type { ProjectRun } from "./lib/velum-project";
import { canonicalPerson, mergePeople } from "./lib/project-review";
import { planProjectRevision, reviseProjectRun } from "./lib/project-revision";
@@ -69,7 +69,7 @@ function RevisionReview(props: { saved: SavedRun; onSaved: () => Promise<void> }
toast.title = "Projektstand aktualisiert";
toast.message = `${plan.released.length} freigegeben · ${plan.merged.length} zusammengeführt`;
pop();
await showInFinder(inPlace ? run.projectPath : join(result.directory, "files")).catch(() => undefined);
await showInFinder(inPlace ? run.projectPath : runCopiesPath(result.run, result.directory)).catch(() => undefined);
} catch (error) {
toast.style = Toast.Style.Failure;
toast.title = "Nachbearbeitung fehlgeschlagen";
@@ -199,8 +199,8 @@ function ProjectHistory(props: { projectName: string; entries: SavedRun[] }) {
subtitle={`${run.files.length} Dateien`}
actions={<ActionPanel>
<Action title="Pseudonymisierte Kopien im Finder anzeigen" icon={Icon.Folder}
onAction={() => showInFinder(join(directory, "files"))} />
<Action.CopyToClipboard title="Speicherpfad kopieren" content={join(directory, "files")} />
onAction={() => showInFinder(runCopiesPath(run, directory))} />
<Action.CopyToClipboard title="Speicherpfad kopieren" content={runCopiesPath(run, directory)} />
<Action title="Dateien als Klartext exportieren" icon={Icon.Download}
onAction={() => push(<FilePicker run={run} directory={directory} />)} />
</ActionPanel>} />)}
@@ -233,8 +233,8 @@ export default function Command() {
...(entries.length > 1 ? [{ text: `${entries.length} Stände` }] : [])]}
actions={<ActionPanel>
<Action title="Pseudonymisierte Kopien im Finder anzeigen" icon={Icon.Folder}
onAction={() => showInFinder(join(directory, "files"))} />
<Action.CopyToClipboard title="Speicherpfad kopieren" content={join(directory, "files")} />
onAction={() => showInFinder(runCopiesPath(run, directory))} />
<Action.CopyToClipboard title="Speicherpfad kopieren" content={runCopiesPath(run, directory)} />
<Action title="Aktuellen Stand nachbearbeiten" icon={Icon.Pencil}
onAction={() => push(<RevisionReview saved={{ run, directory }} onSaved={refresh} />)} />
<Action title="Aktuelle Dateien als Klartext exportieren" icon={Icon.Download}