feat: signout modal text

This commit is contained in:
Zamitto 2024-06-20 18:09:49 -03:00
parent 468af807b0
commit adcb505ab7
10 changed files with 47 additions and 49 deletions

View file

@ -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);
},