Accept dropped files in the terminal (#1173)

This commit is contained in:
Mohamed Boudra
2026-05-25 19:16:39 +08:00
committed by GitHub
parent e40ad0c00e
commit 19289286a6
5 changed files with 353 additions and 1 deletions
+4 -1
View File
@@ -1,4 +1,4 @@
import { contextBridge, ipcRenderer } from "electron";
import { contextBridge, ipcRenderer, webUtils } from "electron";
type EventHandler = (payload: unknown) => void;
@@ -55,6 +55,9 @@ contextBridge.exposeInMainWorld("paseoDesktop", {
opener: {
openUrl: (url: string) => ipcRenderer.invoke("paseo:opener:openUrl", url),
},
webUtils: {
getPathForFile: (file: File) => webUtils.getPathForFile(file),
},
menu: {
showContextMenu: (input?: Record<string, unknown>) =>
ipcRenderer.invoke("paseo:menu:showContextMenu", input),