mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-30 14:21:04 +00:00
refactor: moved the game status to a global file (accessible to the render part) and used it in game entity
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { gameRepository } from "@main/repository";
|
||||
import { GameStatus } from "@main/constants";
|
||||
|
||||
import { searchRepacks } from "../helpers/search-games";
|
||||
import { registerEvent } from "../register-event";
|
||||
import sortBy from "lodash/sortBy";
|
||||
import { GameStatus } from "@globals";
|
||||
|
||||
const getLibrary = async (_event: Electron.IpcMainInvokeEvent) =>
|
||||
gameRepository
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { GameStatus } from "@main/constants";
|
||||
import { gameRepository } from "@main/repository";
|
||||
|
||||
import { registerEvent } from "../register-event";
|
||||
import { WindowManager, writePipe } from "@main/services";
|
||||
|
||||
import { In } from "typeorm";
|
||||
import { GameStatus } from "@globals";
|
||||
|
||||
const cancelGameDownload = async (
|
||||
_event: Electron.IpcMainInvokeEvent,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import path from "node:path";
|
||||
import fs from "node:fs";
|
||||
|
||||
import { GameStatus } from "@main/constants";
|
||||
import { GameStatus } from "@globals";
|
||||
import { gameRepository } from "@main/repository";
|
||||
|
||||
import { getDownloadsPath } from "../helpers/get-downloads-path";
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { WindowManager, writePipe } from "@main/services";
|
||||
|
||||
import { registerEvent } from "../register-event";
|
||||
import { GameStatus } from "../../constants";
|
||||
import { gameRepository } from "../../repository";
|
||||
import { In } from "typeorm";
|
||||
import { GameStatus } from "@globals";
|
||||
|
||||
const pauseGameDownload = async (
|
||||
_event: Electron.IpcMainInvokeEvent,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { GameStatus } from "@main/constants";
|
||||
import { GameStatus } from "@globals";
|
||||
import { gameRepository } from "@main/repository";
|
||||
|
||||
import { registerEvent } from "../register-event";
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { registerEvent } from "../register-event";
|
||||
import { GameStatus } from "../../constants";
|
||||
import { gameRepository } from "../../repository";
|
||||
import { getDownloadsPath } from "../helpers/get-downloads-path";
|
||||
import { In } from "typeorm";
|
||||
import { writePipe } from "@main/services";
|
||||
import { GameStatus } from "@globals";
|
||||
|
||||
const resumeGameDownload = async (
|
||||
_event: Electron.IpcMainInvokeEvent,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { getSteamGameIconUrl, writePipe } from "@main/services";
|
||||
import { gameRepository, repackRepository } from "@main/repository";
|
||||
import { GameStatus } from "@main/constants";
|
||||
|
||||
import { registerEvent } from "../register-event";
|
||||
|
||||
import type { GameShop } from "@types";
|
||||
import { getImageBase64 } from "@main/helpers";
|
||||
import { In } from "typeorm";
|
||||
import { GameStatus } from "@globals";
|
||||
|
||||
const startGameDownload = async (
|
||||
_event: Electron.IpcMainInvokeEvent,
|
||||
|
||||
Reference in New Issue
Block a user