mirror of
https://github.com/kopia/kopia.git
synced 2026-03-11 02:36:39 -04:00
14 lines
351 B
JavaScript
14 lines
351 B
JavaScript
const { contextBridge, ipcRenderer } = require("electron");
|
|
|
|
contextBridge.exposeInMainWorld("kopiaUI", {
|
|
"selectDirectory": function (onSelected) {
|
|
ipcRenderer.invoke('select-dir').then(v => {
|
|
onSelected(v);
|
|
});
|
|
},
|
|
"browseDirectory": function(path) {
|
|
ipcRenderer.invoke('browse-dir', path);
|
|
},
|
|
})
|
|
|