mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
replaced get modules ipc event handler with a two way handler
This commit is contained in:
@@ -82,7 +82,7 @@ electron.app.whenReady().then(createWindow);
|
|||||||
// mainWindow.webContents.send("fuck", "worked uwu")
|
// mainWindow.webContents.send("fuck", "worked uwu")
|
||||||
// }, 5000);
|
// }, 5000);
|
||||||
|
|
||||||
electron.ipcMain.on("get_modules", async (event, args) => {
|
ipcMain.handle('get-module-names', async () => {
|
||||||
let module_array = {
|
let module_array = {
|
||||||
"ai_modules":[],
|
"ai_modules":[],
|
||||||
"transcription_modules":[]
|
"transcription_modules":[]
|
||||||
@@ -97,10 +97,30 @@ electron.ipcMain.on("get_modules", async (event, args) => {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(module_array);
|
// console.log(module_array);
|
||||||
|
return module_array
|
||||||
mainWindow.webContents.send("modules", module_array)
|
});
|
||||||
})
|
|
||||||
|
|
||||||
|
// electron.ipcMain.on("get_modules", async (event, args) => {
|
||||||
|
// let module_array = {
|
||||||
|
// "ai_modules":[],
|
||||||
|
// "transcription_modules":[]
|
||||||
|
// }
|
||||||
|
// mapFunctions.forEach(e => {
|
||||||
|
// switch(e.type){
|
||||||
|
// case "llm":
|
||||||
|
// module_array.ai_modules.push({"name": e.name, "displayname": e.displayname})
|
||||||
|
// break;
|
||||||
|
// case "transcription":
|
||||||
|
// module_array.transcription_modules.push({"name": e.name, "displayname": e.displayname})
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// console.log(module_array);
|
||||||
|
|
||||||
|
// mainWindow.webContents.send("modules", module_array)
|
||||||
|
// })
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -155,7 +175,7 @@ electron.ipcMain.on("file_submit", async (event, args) => {
|
|||||||
// })
|
// })
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user