From 192ef447a6a37eb008bae831b15dc97c0fe46ad7 Mon Sep 17 00:00:00 2001 From: "eric.minning" Date: Wed, 21 Jan 2026 12:19:35 +0100 Subject: [PATCH] Added Comments --- electron/main/preload.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/electron/main/preload.js b/electron/main/preload.js index bf134fe..0225b85 100644 --- a/electron/main/preload.js +++ b/electron/main/preload.js @@ -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") } })