Fixed the Download button in main

This commit is contained in:
MikeHughes-BIN
2025-12-16 16:26:45 +01:00
parent 11f9a02778
commit 95ac7256d4
+6 -2
View File
@@ -124,7 +124,8 @@ electron.ipcMain.handle('get-module-names', async () => {
// mainWindow.webContents.send("modules", module_array)
// })
var globalArgs = {}
var globalFinalHtmlPath = ""
electron.ipcMain.on("file_submit", async (event, args) => {
try {
@@ -198,7 +199,7 @@ electron.ipcMain.on("file_submit", async (event, args) => {
await mapFunctions.get("module-handler").function(args.document.module, { inputTranscriptPath: transcriptpath, documentTypePath: "./storage/documentType/" + templateFile, language: "en" }).then(resp => {
console.log(resp);
transcriptpath = resp
globalFinalHtmlPath = resp
curstep++
mainWindow.webContents.send("progress", {curstep:curstep, totalsteps:totalsteps})
}).catch(err => {
@@ -231,6 +232,9 @@ electron.ipcMain.on("file_submit", async (event, args) => {
}
})
electron.ipcMain.on("file_download", async() => {
await mapFunctions.get("htmlDocumentConverter").convert({inputPath:globalFinalHtmlPath, format: globalArgs.document.outputType, showDialog: true});
})
let q =