From a19ce240af076e270cb3f84b04216f5bb414c41e Mon Sep 17 00:00:00 2001 From: mouzidan Date: Mon, 13 May 2024 22:18:42 +0300 Subject: [PATCH 1/2] fix: repacks-modal title overflow bug --- src/renderer/src/pages/game-details/repacks-modal.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/renderer/src/pages/game-details/repacks-modal.tsx b/src/renderer/src/pages/game-details/repacks-modal.tsx index 3ee3631a..3d927a6b 100644 --- a/src/renderer/src/pages/game-details/repacks-modal.tsx +++ b/src/renderer/src/pages/game-details/repacks-modal.tsx @@ -85,7 +85,9 @@ export function RepacksModal({ onClick={() => handleRepackClick(repack)} className={styles.repackButton} > -

{repack.title}

+

+ {repack.title} +

{repack.fileSize} - {repackersFriendlyNames[repack.repacker]} -{" "} {repack.uploadDate From 59b1f2d5a50027246235851b4c81ad8d38b50259 Mon Sep 17 00:00:00 2001 From: Chubby Granny Chaser Date: Mon, 13 May 2024 23:05:25 +0100 Subject: [PATCH 2/2] fix: improving adding soft deleted games to the library --- .../events/library/add-game-to-library.ts | 37 +++++++++---------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/src/main/events/library/add-game-to-library.ts b/src/main/events/library/add-game-to-library.ts index 49f42d5f..2f4e935d 100644 --- a/src/main/events/library/add-game-to-library.ts +++ b/src/main/events/library/add-game-to-library.ts @@ -13,34 +13,33 @@ const addGameToLibrary = async ( gameShop: GameShop, executablePath: string | null ) => { - const game = await gameRepository.findOne({ - where: { - objectID, - }, - }); - - if (game) { - return gameRepository.update( + return gameRepository + .update( { - id: game.id, + objectID, }, { shop: gameShop, + status: null, executablePath, isDeleted: false, } - ); - } else { - const iconUrl = await getFileBase64(await getSteamGameIconUrl(objectID)); + ) + .then(async ({ affected }) => { + if (!affected) { + const iconUrl = await getFileBase64( + await getSteamGameIconUrl(objectID) + ); - return gameRepository.insert({ - title, - iconUrl, - objectID, - shop: gameShop, - executablePath, + await gameRepository.insert({ + title, + iconUrl, + objectID, + shop: gameShop, + executablePath, + }); + } }); - } }; registerEvent(addGameToLibrary, {