Merge branch 'feat/new-catalogue' into feat/achievements-points

# Conflicts:
#	src/preload/index.ts
#	src/renderer/src/app.tsx
#	src/renderer/src/features/index.ts
#	src/renderer/src/store.ts
#	yarn.lock
This commit is contained in:
Zamitto 2024-12-22 21:22:52 -03:00
commit cabddfb926
54 changed files with 1129 additions and 926 deletions

View file

@ -11,6 +11,7 @@ import type {
GameRunning,
FriendRequestAction,
UpdateProfileRequest,
CatalogueSearchPayload,
SeedingStatus,
GameAchievement,
} from "@types";
@ -54,7 +55,8 @@ contextBridge.exposeInMainWorld("electron", {
},
/* Catalogue */
searchGames: (query: string) => ipcRenderer.invoke("searchGames", query),
searchGames: (payload: CatalogueSearchPayload) =>
ipcRenderer.invoke("searchGames", payload),
getCatalogue: (category: CatalogueCategory) =>
ipcRenderer.invoke("getCatalogue", category),
getGameShopDetails: (objectId: string, shop: GameShop, language: string) =>
@ -62,10 +64,6 @@ contextBridge.exposeInMainWorld("electron", {
getRandomGame: () => ipcRenderer.invoke("getRandomGame"),
getHowLongToBeat: (objectId: string, shop: GameShop) =>
ipcRenderer.invoke("getHowLongToBeat", objectId, shop),
getGames: (take?: number, skip?: number) =>
ipcRenderer.invoke("getGames", take, skip),
searchGameRepacks: (query: string) =>
ipcRenderer.invoke("searchGameRepacks", query),
getGameStats: (objectId: string, shop: GameShop) =>
ipcRenderer.invoke("getGameStats", objectId, shop),
getTrendingGames: () => ipcRenderer.invoke("getTrendingGames"),
@ -85,6 +83,8 @@ contextBridge.exposeInMainWorld("electron", {
listener
);
},
getPublishers: () => ipcRenderer.invoke("getPublishers"),
getDevelopers: () => ipcRenderer.invoke("getDevelopers"),
/* User preferences */
getUserPreferences: () => ipcRenderer.invoke("getUserPreferences"),
@ -96,9 +96,8 @@ contextBridge.exposeInMainWorld("electron", {
ipcRenderer.invoke("authenticateRealDebrid", apiToken),
/* Download sources */
getDownloadSources: () => ipcRenderer.invoke("getDownloadSources"),
deleteDownloadSource: (id: number) =>
ipcRenderer.invoke("deleteDownloadSource", id),
putDownloadSource: (objectIds: string[]) =>
ipcRenderer.invoke("putDownloadSource", objectIds),
/* Library */
addGameToLibrary: (objectId: string, title: string, shop: GameShop) =>