17 lines
986 B
JavaScript
17 lines
986 B
JavaScript
const { contextBridge, ipcRenderer, webUtils } = require('electron');
|
|
|
|
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 }),
|
|
openUnroutedFolder: () => ipcRenderer.invoke('open-unrouted-folder'),
|
|
listUnroutedFiles: () => ipcRenderer.invoke('list-unrouted-files'),
|
|
listDuplicatesFiles: () => ipcRenderer.invoke('list-duplicates-files'),
|
|
clearUnroutedFiles: () => ipcRenderer.invoke('clear-unrouted-files'),
|
|
clearDuplicatesFiles: () => ipcRenderer.invoke('clear-duplicates-files'),
|
|
});
|