mirror of
https://github.com/kopia/kopia.git
synced 2026-03-27 10:32:08 -04:00
* chore(ci): enforce consistent formatting of KopiaUI code * fix htmlui_changelog.sh * fix
13 lines
324 B
JavaScript
13 lines
324 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);
|
|
},
|
|
});
|