Added Comments

This commit is contained in:
2026-01-21 12:19:35 +01:00
parent c202d3960b
commit 192ef447a6
+12 -4
View File
@@ -1,31 +1,39 @@
/*
This file contains the ipc communication methos between the ui and the gui
*/
const { contextBridge, ipcRenderer, webUtils } = require('electron')
try {
//For file lookup on drop
contextBridge.exposeInMainWorld("explorer", {
onFileDrop: (file) => webUtils.getPathForFile(file)
})
//For sending the specifications to the main
contextBridge.exposeInMainWorld("submit", {
submit: (meeting_specifications) => { ipcRenderer.send("file_submit", meeting_specifications) }
})
//For file lookup on search
contextBridge.exposeInMainWorld("electronAPI", {
getFilePath: (file) => { return webUtils.getPathForFile(file) }
})
//Gets all information from the main process
contextBridge.exposeInMainWorld("onStartup", {
getModuleNames: () => ipcRenderer.invoke('get-module-names')
})
//Calls from the main process regarding the progress
contextBridge.exposeInMainWorld('electron', {
progress: (callback) => ipcRenderer.on('progress', callback)
})
//For getting the speaker audios and names from the main
contextBridge.exposeInMainWorld('audios', {
speakerAudios: (callback) => ipcRenderer.on('speakerAudios', callback)
})
//For sending the new speaker names to the main process
contextBridge.exposeInMainWorld("submitSpeaker", {
speaker_submit: (speaker_names) => { ipcRenderer.send("speaker_submit", speaker_names) }
})
//For downloading the finished document
contextBridge.exposeInMainWorld("download", {
file_download: () => { ipcRenderer.send("file_download") }
})