Files
cad-data-router/preload.js

12 lines
622 B
JavaScript
Raw Normal View History

const { contextBridge, ipcRenderer, webUtils } = require('electron');
2026-03-05 14:45:06 +01:00
contextBridge.exposeInMainWorld('api', {
selectFolder: () => ipcRenderer.invoke('select-folder'),
selectZip: () => ipcRenderer.invoke('select-zip'),
processDroppedPath: (path) => ipcRenderer.invoke('process-dropped-path', { path }),
getPathForDroppedFile: (file) => webUtils.getPathForFile(file),
getDestination: () => ipcRenderer.invoke('get-destination'),
selectDestinationFolder: () => ipcRenderer.invoke('select-destination-folder'),
updateDestination: (destination) => ipcRenderer.invoke('update-destination', { destination }),
2026-03-05 14:45:06 +01:00
});