Merge branch 'main' of github.com:ChristoferMendes/hydra into feature/better-repack-modal

This commit is contained in:
ChristoferMendes 2024-05-13 22:31:45 -03:00
commit 95e802372f
2 changed files with 21 additions and 20 deletions

View File

@ -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, {

View File

@ -95,7 +95,9 @@ export function RepacksModal({
onClick={() => handleRepackClick(repack)}
className={styles.repackButton}
>
<p style={{ color: "#DADBE1" }}>{repack.title}</p>
<p style={{ color: "#DADBE1", wordBreak: "break-word" }}>
{repack.title}
</p>
<div
style={{
display: "flex",