Add PDF archive store, raw-body IPC and export file helpers
The searchable PDF can be archived content-addressed under the local data dir with its sha256 and layout fingerprint; a different PDF for an archived invoice is refused and reads verify the hash. Export writes go through a raw-body command that remembers the last folder; reveal-in-folder and open fall back to xdg-open / explorer. Adds a Windows-safe export file name builder. Migration M4 adds the archive columns and last export dir.
This commit is contained in:
@@ -25,6 +25,8 @@ export interface Settings {
|
||||
signatoryDesignation: string;
|
||||
/** The user's default page setup (RenderPrefsV1 JSON); empty means the built-in defaults. */
|
||||
renderPrefs: string;
|
||||
/** Folder of the last export; kept by the backend (saving settings does not change it). */
|
||||
lastExportDir?: string;
|
||||
}
|
||||
|
||||
export interface BankAccount {
|
||||
@@ -136,6 +138,9 @@ export interface Invoice {
|
||||
archivedPdfSha256: string | null;
|
||||
/** RenderPrefsV1 JSON frozen at issue; empty when none was stored. */
|
||||
renderPrefs: string;
|
||||
/** Layout fingerprint of the archived PDF; null when nothing is archived. */
|
||||
archivedFingerprint?: string | null;
|
||||
archivedAt?: string | null;
|
||||
items: InvoiceItem[];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user