feat: add a modal to select game installation folder (pt and en translation)

This commit is contained in:
José Luís 2024-04-20 15:54:08 -03:00
parent 70fe495965
commit ff6c73b95b
13 changed files with 1232 additions and 24 deletions

View file

@ -10,7 +10,7 @@ const addGameToLibrary = async (
_event: Electron.IpcMainInvokeEvent,
objectID: string,
title: string,
gameShop: GameShop,
gameShop: GameShop
) => {
const iconUrl = await getImageBase64(await getSteamGameIconUrl(objectID));

View file

@ -5,7 +5,6 @@ import { GameStatus } from "@main/constants";
import { registerEvent } from "../register-event";
import type { GameShop } from "@types";
import { getDownloadsPath } from "../helpers/get-downloads-path";
import { getImageBase64 } from "@main/helpers";
import { In } from "typeorm";
@ -14,7 +13,8 @@ const startGameDownload = async (
repackId: number,
objectID: string,
title: string,
gameShop: GameShop
gameShop: GameShop,
downloadPath: string
) => {
const [game, repack] = await Promise.all([
gameRepository.findOne({
@ -37,7 +37,7 @@ const startGameDownload = async (
writePipe.write({ action: "pause" });
const downloadsPath = game?.downloadPath ?? (await getDownloadsPath());
const downloadsPath = game?.downloadPath ?? downloadPath;
await gameRepository.update(
{