feat: disabling button when installing

This commit is contained in:
Chubby Granny Chaser
2025-04-06 23:55:39 +01:00
parent e7427b8184
commit a55b5dafa0
4 changed files with 6 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
import { registerEvent } from "../register-event";
import { GameShop } from "@types";
import path from "node:path";
import { _7Zip, GameFilesManager } from "@main/services";
import { GameFilesManager } from "@main/services";
import { downloadsSublevel, gamesSublevel, levelKeys } from "@main/level";
import { FILE_EXTENSIONS_TO_EXTRACT } from "@shared";

View File

@@ -9,7 +9,7 @@ export const binaryName = {
win32: "7z.exe",
};
export class _7Zip {
export class SevenZip {
private static readonly binaryPath = app.isPackaged
? path.join(process.resourcesPath, binaryName[process.platform])
: path.join(

View File

@@ -1,4 +1,4 @@
import { Downloader, DownloadError } from "@shared";
import { Downloader, DownloadError, FILE_EXTENSIONS_TO_EXTRACT } from "@shared";
import { WindowManager } from "../window-manager";
import { publishDownloadCompleteNotification } from "../notifications";
import type { Download, DownloadProgress, UserPreferences } from "@types";
@@ -22,7 +22,6 @@ import { logger } from "../logger";
import { db, downloadsSublevel, gamesSublevel, levelKeys } from "@main/level";
import { sortBy } from "lodash-es";
import { TorBoxClient } from "./torbox";
import { FILE_EXTENSIONS_TO_EXTRACT } from "@shared";
import { GameFilesManager } from "../game-files-manager";
export class DownloadManager {

View File

@@ -3,7 +3,7 @@ import fs from "node:fs";
import type { GameShop } from "@types";
import { downloadsSublevel, gamesSublevel, levelKeys } from "@main/level";
import { FILE_EXTENSIONS_TO_EXTRACT } from "@shared";
import { _7Zip } from "./7zip";
import { SevenZip } from "./7zip";
import { WindowManager } from "./window-manager";
import { publishExtractionCompleteNotification } from "./notifications";
import { logger } from "./logger";
@@ -45,7 +45,7 @@ export class GameFilesManager {
await Promise.all(
filesToExtract.map((file) => {
return new Promise((resolve, reject) => {
_7Zip.extractFile(
SevenZip.extractFile(
{
filePath: path.join(directoryPath, file),
cwd: directoryPath,
@@ -120,7 +120,7 @@ export class GameFilesManager {
path.parse(download.folderName!).name
);
_7Zip.extractFile(
SevenZip.extractFile(
{
filePath,
outputPath: extractionPath,