mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: adding new messages to hero panel
This commit is contained in:
parent
a240c3ae24
commit
d431c01d1b
28 changed files with 398 additions and 358 deletions
|
@ -7,26 +7,14 @@ import type {
|
|||
GameShop,
|
||||
DownloadProgress,
|
||||
UserPreferences,
|
||||
AppUpdaterEvents,
|
||||
AppUpdaterEvent,
|
||||
StartGameDownloadPayload,
|
||||
} from "@types";
|
||||
|
||||
contextBridge.exposeInMainWorld("electron", {
|
||||
/* Torrenting */
|
||||
startGameDownload: (
|
||||
repackId: number,
|
||||
objectID: string,
|
||||
title: string,
|
||||
shop: GameShop,
|
||||
downloadPath: string
|
||||
) =>
|
||||
ipcRenderer.invoke(
|
||||
"startGameDownload",
|
||||
repackId,
|
||||
objectID,
|
||||
title,
|
||||
shop,
|
||||
downloadPath
|
||||
),
|
||||
startGameDownload: (payload: StartGameDownloadPayload) =>
|
||||
ipcRenderer.invoke("startGameDownload", payload),
|
||||
cancelGameDownload: (gameId: number) =>
|
||||
ipcRenderer.invoke("cancelGameDownload", gameId),
|
||||
pauseGameDownload: (gameId: number) =>
|
||||
|
@ -115,10 +103,10 @@ contextBridge.exposeInMainWorld("electron", {
|
|||
platform: process.platform,
|
||||
|
||||
/* Splash */
|
||||
onAutoUpdaterEvent: (cb: (value: AppUpdaterEvents) => void) => {
|
||||
onAutoUpdaterEvent: (cb: (value: AppUpdaterEvent) => void) => {
|
||||
const listener = (
|
||||
_event: Electron.IpcRendererEvent,
|
||||
value: AppUpdaterEvents
|
||||
value: AppUpdaterEvent
|
||||
) => cb(value);
|
||||
|
||||
ipcRenderer.on("autoUpdaterEvent", listener);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue