create electron event

This commit is contained in:
Zamitto 2024-05-19 01:39:50 -03:00
parent 484e79dba3
commit 3b17953a82
11 changed files with 113 additions and 27 deletions

View file

@ -7,6 +7,7 @@ import type {
GameShop,
TorrentProgress,
UserPreferences,
AppUpdaterEvents,
} from "@types";
contextBridge.exposeInMainWorld("electron", {
@ -112,4 +113,8 @@ contextBridge.exposeInMainWorld("electron", {
showOpenDialog: (options: Electron.OpenDialogOptions) =>
ipcRenderer.invoke("showOpenDialog", options),
platform: process.platform,
/* Splash */
checkForUpdates: (cb: (value: AppUpdaterEvents) => void) =>
ipcRenderer.invoke("checkForUpdates", cb),
});