12 lines
371 B
JavaScript
12 lines
371 B
JavaScript
// @ts-check
|
|
const { contextBridge, ipcRenderer } = require('electron');
|
|
|
|
contextBridge.exposeInMainWorld('electronAPI', {
|
|
// File dialogs
|
|
openFiles: (filters) => ipcRenderer.invoke('dialog:openFiles', filters),
|
|
openFile: (filters) => ipcRenderer.invoke('dialog:openFile', filters),
|
|
|
|
// Backend URL
|
|
getBackendURL: () => ipcRenderer.invoke('getBackendURL'),
|
|
});
|