mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feature: add collections section
This commit is contained in:
parent
6fce60f9f7
commit
b7cabfdbde
26 changed files with 485 additions and 7 deletions
|
@ -9,6 +9,8 @@ import type {
|
|||
AppUpdaterEvent,
|
||||
StartGameDownloadPayload,
|
||||
GameRunning,
|
||||
Collection,
|
||||
Game,
|
||||
} from "@types";
|
||||
|
||||
contextBridge.exposeInMainWorld("electron", {
|
||||
|
@ -102,6 +104,16 @@ contextBridge.exposeInMainWorld("electron", {
|
|||
ipcRenderer.removeListener("on-library-batch-complete", listener);
|
||||
},
|
||||
|
||||
/* Collections */
|
||||
addCollection: (title: string) => ipcRenderer.invoke("addCollection", title),
|
||||
addCollectionGame: (id: number, game: Game) =>
|
||||
ipcRenderer.invoke("addCollectionGame", id, game),
|
||||
getCollections: () => ipcRenderer.invoke("getCollections"),
|
||||
removeCollection: (collection: Collection) =>
|
||||
ipcRenderer.invoke("removeCollection", collection),
|
||||
removeCollectionGame: (id: number, game: Game) =>
|
||||
ipcRenderer.invoke("removeCollectionGame", id, game),
|
||||
|
||||
/* Hardware */
|
||||
getDiskFreeSpace: (path: string) =>
|
||||
ipcRenderer.invoke("getDiskFreeSpace", path),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue