mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: adding download method toggle
This commit is contained in:
commit
a240c3ae24
33 changed files with 564 additions and 45 deletions
|
@ -7,6 +7,7 @@ import type {
|
|||
GameShop,
|
||||
DownloadProgress,
|
||||
UserPreferences,
|
||||
AppUpdaterEvents,
|
||||
} from "@types";
|
||||
|
||||
contextBridge.exposeInMainWorld("electron", {
|
||||
|
@ -112,4 +113,21 @@ contextBridge.exposeInMainWorld("electron", {
|
|||
showOpenDialog: (options: Electron.OpenDialogOptions) =>
|
||||
ipcRenderer.invoke("showOpenDialog", options),
|
||||
platform: process.platform,
|
||||
|
||||
/* Splash */
|
||||
onAutoUpdaterEvent: (cb: (value: AppUpdaterEvents) => void) => {
|
||||
const listener = (
|
||||
_event: Electron.IpcRendererEvent,
|
||||
value: AppUpdaterEvents
|
||||
) => cb(value);
|
||||
|
||||
ipcRenderer.on("autoUpdaterEvent", listener);
|
||||
|
||||
return () => {
|
||||
ipcRenderer.removeListener("autoUpdaterEvent", listener);
|
||||
};
|
||||
},
|
||||
checkForUpdates: () => ipcRenderer.invoke("checkForUpdates"),
|
||||
restartAndInstallUpdate: () => ipcRenderer.invoke("restartAndInstallUpdate"),
|
||||
continueToMainWindow: () => ipcRenderer.invoke("continueToMainWindow"),
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue