Attachments: manual 'Find orphaned attachments' tool in the Info panel - scans all notes incl. trash, previews unreferenced files with sizes, moves to vault trash (recoverable); conservative raw+decoded matching, re-verified before moving, with a loading spinner (#52)

This commit is contained in:
Yuri Karamian
2026-06-11 23:16:59 +02:00
parent b501d2bd5c
commit 15c6e6388a
4 changed files with 232 additions and 1 deletions
+13
View File
@@ -276,6 +276,19 @@ export async function getVaultStats(): Promise<VaultStats> {
return invoke("get_vault_stats");
}
export interface OrphanAttachment {
name: string;
size: number;
}
export async function findOrphanedAttachments(): Promise<OrphanAttachment[]> {
return invoke("find_orphaned_attachments");
}
export async function trashOrphanedAttachments(names: string[]): Promise<number> {
return invoke("trash_orphaned_attachments", { names });
}
export async function importObsidian(): Promise<void> {
return invoke("import_obsidian");
}