You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
771 B

4 months ago
const { contextBridge, ipcRenderer } = require('electron')
const Store = require("electron-store");
const store = new Store();
contextBridge.exposeInMainWorld('api', {
createUtilsWindow: (flag) => {
ipcRenderer.send('create-utils-window', flag)
},
uploadFile: (id) => {
ipcRenderer.send("upload-file", id);
},
watchuploadFile: (id) => {
ipcRenderer.invoke("watch-upload-file", id);
},
getConfig: () => ipcRenderer.invoke('get-config'),
updateConfig: (config) => ipcRenderer.invoke('update-config', config),
getStoreValue: (key) => store.get(key),
removeStoreValue: (key) => store.delete(key),
watchUploadLatestAnalysisFile: (id) => {
ipcRenderer.invoke("watch-upload-analysis-file", id);
},
})