mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
Fixed the Download button in main
This commit is contained in:
@@ -124,7 +124,8 @@ electron.ipcMain.handle('get-module-names', async () => {
|
|||||||
// mainWindow.webContents.send("modules", module_array)
|
// mainWindow.webContents.send("modules", module_array)
|
||||||
// })
|
// })
|
||||||
|
|
||||||
|
var globalArgs = {}
|
||||||
|
var globalFinalHtmlPath = ""
|
||||||
|
|
||||||
electron.ipcMain.on("file_submit", async (event, args) => {
|
electron.ipcMain.on("file_submit", async (event, args) => {
|
||||||
try {
|
try {
|
||||||
@@ -197,14 +198,14 @@ electron.ipcMain.on("file_submit", async (event, args) => {
|
|||||||
console.log(`\n\n Running the LLM for Document Style ${args.document.type}`);
|
console.log(`\n\n Running the LLM for Document Style ${args.document.type}`);
|
||||||
|
|
||||||
await mapFunctions.get("module-handler").function(args.document.module, { inputTranscriptPath: transcriptpath, documentTypePath: "./storage/documentType/" + templateFile, language: "en" }).then(resp => {
|
await mapFunctions.get("module-handler").function(args.document.module, { inputTranscriptPath: transcriptpath, documentTypePath: "./storage/documentType/" + templateFile, language: "en" }).then(resp => {
|
||||||
console.log(resp);
|
console.log(resp);
|
||||||
transcriptpath = resp
|
globalFinalHtmlPath = resp
|
||||||
curstep++
|
curstep++
|
||||||
mainWindow.webContents.send("progress", { curstep: curstep, totalsteps: totalsteps })
|
mainWindow.webContents.send("progress", {curstep:curstep, totalsteps:totalsteps})
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
mainWindow.webContents.send("error", err)
|
mainWindow.webContents.send("error", err)
|
||||||
return
|
return
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
// TODO actually implement this functionality
|
// TODO actually implement this functionality
|
||||||
@@ -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 =
|
let q =
|
||||||
|
|||||||
Reference in New Issue
Block a user