undo addGameToLibrary change

This commit is contained in:
Zamitto 2024-06-04 23:52:29 -03:00
parent 2c26fed478
commit 581f7983aa

View File

@ -77,11 +77,13 @@ export function HeroPanelActions() {
if (game) { if (game) {
await removeGameFromLibrary(game.id); await removeGameFromLibrary(game.id);
} else { } else {
const gameExecutablePath = await selectGameExecutable();
await window.electron.addGameToLibrary( await window.electron.addGameToLibrary(
objectID!, objectID!,
gameTitle, gameTitle,
"steam", "steam",
null gameExecutablePath
); );
} }
@ -224,7 +226,7 @@ export function HeroPanelActions() {
if (game) { if (game) {
return ( return (
<> <>
{game?.progress === 1 && game?.folderName && ( {game.progress === 1 && game.downloadPath && (
<> <>
<BinaryNotFoundModal <BinaryNotFoundModal
visible={showBinaryNotFoundModal} visible={showBinaryNotFoundModal}
@ -242,9 +244,9 @@ export function HeroPanelActions() {
</> </>
)} )}
{game?.progress === 1 && !game?.folderName && showDownloadOptionsButton} {game.progress === 1 && !game.downloadPath && showDownloadOptionsButton}
{game?.progress !== 1 && toggleGameOnLibraryButton} {game.progress !== 1 && toggleGameOnLibraryButton}
{isGameRunning ? ( {isGameRunning ? (
<Button <Button