mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: signout modal text
This commit is contained in:
parent
468af807b0
commit
adcb505ab7
10 changed files with 47 additions and 49 deletions
|
@ -8,7 +8,7 @@ import type {
|
|||
UserPreferences,
|
||||
AppUpdaterEvent,
|
||||
StartGameDownloadPayload,
|
||||
RunningGameEvent,
|
||||
GameRunning,
|
||||
} from "@types";
|
||||
|
||||
contextBridge.exposeInMainWorld("electron", {
|
||||
|
@ -85,11 +85,13 @@ contextBridge.exposeInMainWorld("electron", {
|
|||
ipcRenderer.invoke("deleteGameFolder", gameId),
|
||||
getGameByObjectID: (objectID: string) =>
|
||||
ipcRenderer.invoke("getGameByObjectID", objectID),
|
||||
onRunningGames: (cb: (runningGames: RunningGameEvent) => void) => {
|
||||
const listener = (
|
||||
_event: Electron.IpcRendererEvent,
|
||||
runningGames: RunningGameEvent
|
||||
) => cb(runningGames);
|
||||
onGamesRunning: (
|
||||
cb: (
|
||||
gamesRunning: Pick<GameRunning, "id" | "sessionDurationInMillis">[]
|
||||
) => void
|
||||
) => {
|
||||
const listener = (_event: Electron.IpcRendererEvent, gamesRunning) =>
|
||||
cb(gamesRunning);
|
||||
ipcRenderer.on("on-games-running", listener);
|
||||
return () => ipcRenderer.removeListener("on-games-running", listener);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue