Implemented the interaction between the gui and main so that the ai/transcript names get loaded inside the dropdowns

This commit is contained in:
2025-11-24 12:52:49 +01:00
parent b4f2ed561d
commit 6531f5f51c
3 changed files with 25 additions and 20 deletions
+9 -1
View File
@@ -10,6 +10,14 @@ try {
contextBridge.exposeInMainWorld("electronAPI", {
getFilePath: (file) => {return webUtils.getPathForFile(file)}
})
contextBridge.exposeInMainWorld("onStartup", {
getModuleNames: (file) => { ipcRenderer.send("get_modules", "")}
})
ipcRenderer.on("modules", (event, resp) => {
loadAiOptions(resp.ai_modules);
loadTranscriptionOptions(resp.transcription_modules);
})
} catch (error) {
console.log("Error in preload.js");
}
}