feat: Bump version to 1.1.1 and implement new file handling features in the desktop application. Add MinIO download source picker, enhance extraction and counting wizards with support for downloading files, and improve styling for better user experience. Introduce unit tests for download manifest functionalities.

This commit is contained in:
erik
2026-07-17 09:32:18 -05:00
parent dc3fcc2280
commit 447359166b
17 changed files with 1914 additions and 387 deletions
+25
View File
@@ -103,11 +103,36 @@ ipcMain.handle("dialog:save-csv", async (_event, defaultPath) => {
return result.filePath;
});
ipcMain.handle("dialog:save-file", async (_event, defaultPath, filters) => {
const result = await dialog.showSaveDialog({
defaultPath: defaultPath || "documento.pdf",
filters: Array.isArray(filters) && filters.length > 0
? filters
: [{ name: "PDF", extensions: ["pdf"] }],
});
if (result.canceled || !result.filePath) return null;
return result.filePath;
});
ipcMain.handle("file:write-text", async (_event, filePath, content) => {
await fs.writeFile(filePath, content, "utf8");
return { ok: true, filePath };
});
ipcMain.handle("file:write-bytes", async (_event, filePath, data) => {
const buffer = Buffer.isBuffer(data)
? data
: Buffer.from(data instanceof ArrayBuffer ? data : new Uint8Array(data));
await fs.mkdir(path.dirname(filePath), { recursive: true });
await fs.writeFile(filePath, buffer);
return { ok: true, filePath };
});
ipcMain.handle("path:join", async (_event, parts) => {
const list = Array.isArray(parts) ? parts.map(String) : [];
return path.join(...list);
});
ipcMain.handle("fs:first-document", async (_event, rootPath, keywords) => {
const matches = await findDocuments(rootPath, Array.isArray(keywords) ? keywords : []);
return matches[0] || null;