mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-09 03:37:45 +03:00
fix: fixing dependencies
This commit is contained in:
parent
cdd9908775
commit
db79136cf5
@ -1,5 +1,6 @@
|
||||
module.exports = {
|
||||
semi: true,
|
||||
trailingComma: "all",
|
||||
trailingComma: "es5",
|
||||
singleQuote: false,
|
||||
tabWidth: 2,
|
||||
};
|
||||
|
@ -39,13 +39,13 @@ const config: ForgeConfig = {
|
||||
new MakerRpm({
|
||||
options: {
|
||||
mimeType: ["x-scheme-handler/hydralauncher"],
|
||||
bin: './Hydra'
|
||||
bin: "./Hydra",
|
||||
},
|
||||
}),
|
||||
new MakerDeb({
|
||||
options: {
|
||||
mimeType: ["x-scheme-handler/hydralauncher"],
|
||||
bin: './Hydra'
|
||||
bin: "./Hydra",
|
||||
},
|
||||
}),
|
||||
],
|
||||
|
19174
package-lock.json
generated
19174
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
14
package.json
14
package.json
@ -16,7 +16,8 @@
|
||||
"package": "electron-forge package",
|
||||
"make": "electron-forge make",
|
||||
"publish": "electron-forge publish",
|
||||
"lint": "eslint ."
|
||||
"lint": "eslint .",
|
||||
"format": "prettier . --write"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@electron-forge/cli": "^7.3.0",
|
||||
@ -43,6 +44,7 @@
|
||||
"@typescript-eslint/parser": "^7.3.1",
|
||||
"@vanilla-extract/webpack-plugin": "^2.3.7",
|
||||
"@vercel/webpack-asset-relocator-loader": "1.7.3",
|
||||
"@vitejs/plugin-react-swc": "^3.6.0",
|
||||
"css-loader": "^6.0.0",
|
||||
"dotenv-webpack": "^8.1.0",
|
||||
"electron": "29.1.4",
|
||||
@ -52,25 +54,26 @@
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"fork-ts-checker-webpack-plugin": "^7.2.13",
|
||||
"node-loader": "^2.0.0",
|
||||
"prettier": "^3.2.5",
|
||||
"style-loader": "^3.0.0",
|
||||
"ts-loader": "^9.2.2",
|
||||
"ts-node": "^10.0.0",
|
||||
"tsconfig-paths": "^4.2.0",
|
||||
"tsconfig-paths-webpack-plugin": "^4.1.0",
|
||||
"typescript": "^5.4.3"
|
||||
"typescript": "^5.4.3",
|
||||
"vite-plugin-svgr": "^4.2.0",
|
||||
"vite-tsconfig-paths": "^4.3.2"
|
||||
},
|
||||
"keywords": [],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@fontsource/fira-mono": "^5.0.12",
|
||||
"@fontsource/fira-sans": "^5.0.19",
|
||||
"@msgpack/msgpack": "^3.0.0-beta2",
|
||||
"@primer/octicons-react": "^19.8.0",
|
||||
"@reduxjs/toolkit": "^2.2.2",
|
||||
"@vanilla-extract/css": "^1.14.1",
|
||||
"@vanilla-extract/recipes": "^0.5.2",
|
||||
"@vanilla-extract/vite-plugin": "^4.0.6",
|
||||
"@vitejs/plugin-react-swc": "^3.6.0",
|
||||
"axios": "^1.6.8",
|
||||
"check-disk-space": "^3.4.0",
|
||||
"classnames": "^2.5.1",
|
||||
@ -92,12 +95,9 @@
|
||||
"react-redux": "^9.1.0",
|
||||
"react-router-dom": "^6.22.3",
|
||||
"sqlite3": "^5.1.7",
|
||||
"systeminformation": "^5.22.3",
|
||||
"typeorm": "^0.3.20",
|
||||
"update-electron-app": "^3.0.0",
|
||||
"uuid": "^9.0.1",
|
||||
"vite-plugin-svgr": "^4.2.0",
|
||||
"vite-tsconfig-paths": "^4.3.2",
|
||||
"winston": "^3.12.0",
|
||||
"yaml": "^2.4.1"
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
@ -1,119 +1,119 @@
|
||||
{
|
||||
"catalogue": {
|
||||
"featured": "Destacado",
|
||||
"recently_added": "Recién Añadidos",
|
||||
"trending": "Tendencias",
|
||||
"surprise_me": "✨ ¡Sorpréndeme!"
|
||||
},
|
||||
"sidebar": {
|
||||
"catalogue": "Catálogo",
|
||||
"downloads": "Descargas",
|
||||
"settings": "Ajustes",
|
||||
"my_library": "Mi biblioteca",
|
||||
"downloading_metadata": "{{title}} (Descargando metadatos…)",
|
||||
"checking_files": "{{title}} ({{percentage}} - Analizando archivos…)",
|
||||
"paused": "{{title}} (Pausado)",
|
||||
"downloading": "{{title}} ({{percentage}} - Descargando…)",
|
||||
"filter": "Filtrar biblioteca"
|
||||
},
|
||||
"header": {
|
||||
"search": "Buscar",
|
||||
"catalogue": "Catálogo",
|
||||
"downloads": "Descargas",
|
||||
"search_results": "Resultados de búsqueda",
|
||||
"settings": "Ajustes"
|
||||
},
|
||||
"bottom_panel": {
|
||||
"no_downloads_in_progress": "Sin descargas en progreso",
|
||||
"downloading_metadata": "Descargando metadatos de {{title}}…",
|
||||
"checking_files": "Analizando archivos de {{title}} - ({{percentage}} completado)",
|
||||
"downloading": "Descargando {{title}}… ({{percentage}} completado) - Finalizando {{eta}} - {{speed}}",
|
||||
"deleting": "Eliminando archivos…"
|
||||
},
|
||||
"game_details": {
|
||||
"open_download_options": "Ver opciones de descargas",
|
||||
"download_options_zero": "No hay opciones de descargas disponibles",
|
||||
"download_options_one": "{{count}} opción de descarga",
|
||||
"download_options_other": "{{count}} opciones de descargas",
|
||||
"updated_at": "Actualizado el {{updated_at}}",
|
||||
"launch": "Iniciar",
|
||||
"resume": "Continuar",
|
||||
"pause": "Pausa",
|
||||
"cancel": "Cancelar",
|
||||
"remove": "Eliminar",
|
||||
"space_left_on_disk": "{{space}} restantes en el disco",
|
||||
"eta": "Finalizando {{eta}}",
|
||||
"downloading_metadata": "Descargando metadatos…",
|
||||
"checking_files": "Analizando archivos…",
|
||||
"filter": "Filtrar repacks",
|
||||
"requirements": "Requisitos del Sistema",
|
||||
"minimum": "Mínimos",
|
||||
"recommended": "Recomendados",
|
||||
"no_minimum_requirements": "Sin requisitos mínimos para {{title}}",
|
||||
"no_recommended_requirements": "{{title}} no tiene requisitos recomendados",
|
||||
"paused_progress": "{{progress}} (Pausado)",
|
||||
"deleting": "Eliminando archivos…",
|
||||
"delete": "Eliminar todos los archivos",
|
||||
"release_date": "Fecha de lanzamiento {{date}}",
|
||||
"publisher": "Publicado por {{publisher}}",
|
||||
"copy_link_to_clipboard": "Copiar enlace",
|
||||
"copied_link_to_clipboard": "Enlace copiado",
|
||||
"hours": "horas",
|
||||
"minutes": "minutos",
|
||||
"accuracy": "{{accuracy}}% precisión"
|
||||
},
|
||||
"activation": {
|
||||
"title": "Activar Hydra",
|
||||
"installation_id": "ID de la Instalación:",
|
||||
"enter_activation_code": "Introduce tu código de activación",
|
||||
"message": "Si no sabes donde obtener el código, no deberías de tener esto.",
|
||||
"activate": "Activar",
|
||||
"loading": "Cargando…"
|
||||
},
|
||||
"downloads": {
|
||||
"launch": "Iniciar",
|
||||
"resume": "Resumir",
|
||||
"pause": "Pausa",
|
||||
"eta": "Finalizando {{eta}}",
|
||||
"paused": "En Pausa",
|
||||
"verifying": "Verificando…",
|
||||
"completed_at": "Completado el {{date}}",
|
||||
"completed": "Completado",
|
||||
"cancelled": "Cancelado",
|
||||
"download_again": "Descargar de nuevo",
|
||||
"cancel": "Cancelar",
|
||||
"filter": "Buscar juegos descargados",
|
||||
"remove": "Eliminar",
|
||||
"downloading_metadata": "Descargando metadatos…",
|
||||
"checking_files": "Verificando archivos…",
|
||||
"starting_download": "Iniciando descarga…",
|
||||
"deleting": "Eliminando archivos…",
|
||||
"delete": "Eliminar todos los archivos"
|
||||
},
|
||||
"settings": {
|
||||
"downloads_path": "Ruta de descarga",
|
||||
"change": "Cambiar",
|
||||
"notifications": "Notificaciones",
|
||||
"enable_download_notifications": "Cuando se completa una descarga",
|
||||
"enable_repack_list_notifications": "Cuando se añade un repack nuevo"
|
||||
},
|
||||
"notifications": {
|
||||
"download_complete": "Descarga completada",
|
||||
"game_ready_to_install": "{{title}} está listo para instalarse",
|
||||
"repack_list_updated": "Lista de repacks actualizadas",
|
||||
"repack_count_one": "{{count}} repack ha sido añadido",
|
||||
"repack_count_other": "{{count}} repacks añadidos"
|
||||
},
|
||||
"system_tray": {
|
||||
"open": "Abrir Hydra",
|
||||
"quit": "Salir"
|
||||
},
|
||||
"game_card": {
|
||||
"no_downloads": "No hay descargas disponibles"
|
||||
},
|
||||
"binary_not_found_modal": {
|
||||
"title": "Programas no instalados",
|
||||
"description": "Los ejecutables de Wine o Lutris no se encontraron en su sistema",
|
||||
"instructions": "Comprueba la forma correcta de instalar cualquiera de ellos en tu distro Linux para que el juego pueda ejecutarse con normalidad"
|
||||
}
|
||||
}
|
||||
{
|
||||
"catalogue": {
|
||||
"featured": "Destacado",
|
||||
"recently_added": "Recién Añadidos",
|
||||
"trending": "Tendencias",
|
||||
"surprise_me": "✨ ¡Sorpréndeme!"
|
||||
},
|
||||
"sidebar": {
|
||||
"catalogue": "Catálogo",
|
||||
"downloads": "Descargas",
|
||||
"settings": "Ajustes",
|
||||
"my_library": "Mi biblioteca",
|
||||
"downloading_metadata": "{{title}} (Descargando metadatos…)",
|
||||
"checking_files": "{{title}} ({{percentage}} - Analizando archivos…)",
|
||||
"paused": "{{title}} (Pausado)",
|
||||
"downloading": "{{title}} ({{percentage}} - Descargando…)",
|
||||
"filter": "Filtrar biblioteca"
|
||||
},
|
||||
"header": {
|
||||
"search": "Buscar",
|
||||
"catalogue": "Catálogo",
|
||||
"downloads": "Descargas",
|
||||
"search_results": "Resultados de búsqueda",
|
||||
"settings": "Ajustes"
|
||||
},
|
||||
"bottom_panel": {
|
||||
"no_downloads_in_progress": "Sin descargas en progreso",
|
||||
"downloading_metadata": "Descargando metadatos de {{title}}…",
|
||||
"checking_files": "Analizando archivos de {{title}} - ({{percentage}} completado)",
|
||||
"downloading": "Descargando {{title}}… ({{percentage}} completado) - Finalizando {{eta}} - {{speed}}",
|
||||
"deleting": "Eliminando archivos…"
|
||||
},
|
||||
"game_details": {
|
||||
"open_download_options": "Ver opciones de descargas",
|
||||
"download_options_zero": "No hay opciones de descargas disponibles",
|
||||
"download_options_one": "{{count}} opción de descarga",
|
||||
"download_options_other": "{{count}} opciones de descargas",
|
||||
"updated_at": "Actualizado el {{updated_at}}",
|
||||
"launch": "Iniciar",
|
||||
"resume": "Continuar",
|
||||
"pause": "Pausa",
|
||||
"cancel": "Cancelar",
|
||||
"remove": "Eliminar",
|
||||
"space_left_on_disk": "{{space}} restantes en el disco",
|
||||
"eta": "Finalizando {{eta}}",
|
||||
"downloading_metadata": "Descargando metadatos…",
|
||||
"checking_files": "Analizando archivos…",
|
||||
"filter": "Filtrar repacks",
|
||||
"requirements": "Requisitos del Sistema",
|
||||
"minimum": "Mínimos",
|
||||
"recommended": "Recomendados",
|
||||
"no_minimum_requirements": "Sin requisitos mínimos para {{title}}",
|
||||
"no_recommended_requirements": "{{title}} no tiene requisitos recomendados",
|
||||
"paused_progress": "{{progress}} (Pausado)",
|
||||
"deleting": "Eliminando archivos…",
|
||||
"delete": "Eliminar todos los archivos",
|
||||
"release_date": "Fecha de lanzamiento {{date}}",
|
||||
"publisher": "Publicado por {{publisher}}",
|
||||
"copy_link_to_clipboard": "Copiar enlace",
|
||||
"copied_link_to_clipboard": "Enlace copiado",
|
||||
"hours": "horas",
|
||||
"minutes": "minutos",
|
||||
"accuracy": "{{accuracy}}% precisión"
|
||||
},
|
||||
"activation": {
|
||||
"title": "Activar Hydra",
|
||||
"installation_id": "ID de la Instalación:",
|
||||
"enter_activation_code": "Introduce tu código de activación",
|
||||
"message": "Si no sabes donde obtener el código, no deberías de tener esto.",
|
||||
"activate": "Activar",
|
||||
"loading": "Cargando…"
|
||||
},
|
||||
"downloads": {
|
||||
"launch": "Iniciar",
|
||||
"resume": "Resumir",
|
||||
"pause": "Pausa",
|
||||
"eta": "Finalizando {{eta}}",
|
||||
"paused": "En Pausa",
|
||||
"verifying": "Verificando…",
|
||||
"completed_at": "Completado el {{date}}",
|
||||
"completed": "Completado",
|
||||
"cancelled": "Cancelado",
|
||||
"download_again": "Descargar de nuevo",
|
||||
"cancel": "Cancelar",
|
||||
"filter": "Buscar juegos descargados",
|
||||
"remove": "Eliminar",
|
||||
"downloading_metadata": "Descargando metadatos…",
|
||||
"checking_files": "Verificando archivos…",
|
||||
"starting_download": "Iniciando descarga…",
|
||||
"deleting": "Eliminando archivos…",
|
||||
"delete": "Eliminar todos los archivos"
|
||||
},
|
||||
"settings": {
|
||||
"downloads_path": "Ruta de descarga",
|
||||
"change": "Cambiar",
|
||||
"notifications": "Notificaciones",
|
||||
"enable_download_notifications": "Cuando se completa una descarga",
|
||||
"enable_repack_list_notifications": "Cuando se añade un repack nuevo"
|
||||
},
|
||||
"notifications": {
|
||||
"download_complete": "Descarga completada",
|
||||
"game_ready_to_install": "{{title}} está listo para instalarse",
|
||||
"repack_list_updated": "Lista de repacks actualizadas",
|
||||
"repack_count_one": "{{count}} repack ha sido añadido",
|
||||
"repack_count_other": "{{count}} repacks añadidos"
|
||||
},
|
||||
"system_tray": {
|
||||
"open": "Abrir Hydra",
|
||||
"quit": "Salir"
|
||||
},
|
||||
"game_card": {
|
||||
"no_downloads": "No hay descargas disponibles"
|
||||
},
|
||||
"binary_not_found_modal": {
|
||||
"title": "Programas no instalados",
|
||||
"description": "Los ejecutables de Wine o Lutris no se encontraron en su sistema",
|
||||
"instructions": "Comprueba la forma correcta de instalar cualquiera de ellos en tu distro Linux para que el juego pueda ejecutarse con normalidad"
|
||||
}
|
||||
}
|
||||
|
@ -109,4 +109,3 @@
|
||||
"no_downloads": "Aucun téléchargement disponible"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,54 +1,54 @@
|
||||
import { app } from "electron";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
|
||||
export const repackersOn1337x = [
|
||||
"DODI",
|
||||
"FitGirl",
|
||||
"0xEMPRESS",
|
||||
"KaOsKrew",
|
||||
"TinyRepacks",
|
||||
] as const;
|
||||
|
||||
export const repackers = [
|
||||
...repackersOn1337x,
|
||||
"Xatab",
|
||||
"CPG",
|
||||
"TinyRepacks",
|
||||
"GOG",
|
||||
] as const;
|
||||
|
||||
export const months = [
|
||||
"Jan",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Apr",
|
||||
"May",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Aug",
|
||||
"Sep",
|
||||
"Oct",
|
||||
"Nov",
|
||||
"Dec",
|
||||
];
|
||||
|
||||
export enum GameStatus {
|
||||
Seeding = "seeding",
|
||||
Downloading = "downloading",
|
||||
Paused = "paused",
|
||||
CheckingFiles = "checking_files",
|
||||
DownloadingMetadata = "downloading_metadata",
|
||||
Cancelled = "cancelled",
|
||||
}
|
||||
|
||||
export const defaultDownloadsPath = path.join(os.homedir(), "downloads");
|
||||
|
||||
export const databasePath = path.join(
|
||||
app.getPath("appData"),
|
||||
app.getName(),
|
||||
"hydra.db"
|
||||
);
|
||||
|
||||
export const INSTALLATION_ID_LENGTH = 6;
|
||||
export const ACTIVATION_KEY_MULTIPLIER = 7;
|
||||
import { app } from "electron";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
|
||||
export const repackersOn1337x = [
|
||||
"DODI",
|
||||
"FitGirl",
|
||||
"0xEMPRESS",
|
||||
"KaOsKrew",
|
||||
"TinyRepacks",
|
||||
] as const;
|
||||
|
||||
export const repackers = [
|
||||
...repackersOn1337x,
|
||||
"Xatab",
|
||||
"CPG",
|
||||
"TinyRepacks",
|
||||
"GOG",
|
||||
] as const;
|
||||
|
||||
export const months = [
|
||||
"Jan",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Apr",
|
||||
"May",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Aug",
|
||||
"Sep",
|
||||
"Oct",
|
||||
"Nov",
|
||||
"Dec",
|
||||
];
|
||||
|
||||
export enum GameStatus {
|
||||
Seeding = "seeding",
|
||||
Downloading = "downloading",
|
||||
Paused = "paused",
|
||||
CheckingFiles = "checking_files",
|
||||
DownloadingMetadata = "downloading_metadata",
|
||||
Cancelled = "cancelled",
|
||||
}
|
||||
|
||||
export const defaultDownloadsPath = path.join(os.homedir(), "downloads");
|
||||
|
||||
export const databasePath = path.join(
|
||||
app.getPath("appData"),
|
||||
app.getName(),
|
||||
"hydra.db"
|
||||
);
|
||||
|
||||
export const INSTALLATION_ID_LENGTH = 6;
|
||||
export const ACTIVATION_KEY_MULTIPLIER = 7;
|
||||
|
@ -23,7 +23,7 @@ const openGame = async (
|
||||
);
|
||||
|
||||
if (!fs.existsSync(gamePath)) {
|
||||
await gameRepository.delete({ id: gameId, });
|
||||
await gameRepository.delete({ id: gameId });
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -15,23 +15,30 @@ export const generateYML = (game: Game) => {
|
||||
game: {
|
||||
prefix: "$GAMEDIR",
|
||||
arch: "win64",
|
||||
working_dir: "$GAMEDIR"
|
||||
working_dir: "$GAMEDIR",
|
||||
},
|
||||
installer: [{
|
||||
task: {
|
||||
name: "create_prefix",
|
||||
arch: "win64",
|
||||
prefix: "$GAMEDIR"
|
||||
}
|
||||
}, {
|
||||
task: {
|
||||
executable: path.join(game.downloadPath, game.folderName, "setup.exe"),
|
||||
name: "wineexec",
|
||||
prefix: "$GAMEDIR"
|
||||
}
|
||||
}]
|
||||
}
|
||||
installer: [
|
||||
{
|
||||
task: {
|
||||
name: "create_prefix",
|
||||
arch: "win64",
|
||||
prefix: "$GAMEDIR",
|
||||
},
|
||||
},
|
||||
{
|
||||
task: {
|
||||
executable: path.join(
|
||||
game.downloadPath,
|
||||
game.folderName,
|
||||
"setup.exe"
|
||||
),
|
||||
name: "wineexec",
|
||||
prefix: "$GAMEDIR",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
return doc.toString();
|
||||
}
|
||||
};
|
||||
|
@ -19,11 +19,11 @@ export const getSteamDBAlgoliaCredentials = async () => {
|
||||
});
|
||||
|
||||
const js = await requestWebPage(
|
||||
`https://steamdb.info/static/js/instantsearch.js?${searchParams.toString()}`,
|
||||
`https://steamdb.info/static/js/instantsearch.js?${searchParams.toString()}`
|
||||
);
|
||||
|
||||
const algoliaCredentialsRegExp = new RegExp(
|
||||
/algoliasearch\("(.*?)",atob\("(.*?)"\)\);/,
|
||||
/algoliasearch\("(.*?)",atob\("(.*?)"\)\);/
|
||||
);
|
||||
|
||||
const [, applicationId, encodedApiKey] = algoliaCredentialsRegExp.exec(js);
|
||||
@ -35,7 +35,7 @@ export const getSteamDBAlgoliaCredentials = async () => {
|
||||
};
|
||||
|
||||
export const searchAlgolia = async <T>(
|
||||
params: AlgoliaSearchParams,
|
||||
params: AlgoliaSearchParams
|
||||
): Promise<AlgoliaResponse<T>> => {
|
||||
const algoliaCredentials = stateManager.getValue("steamDBAlgoliaCredentials");
|
||||
|
||||
@ -55,7 +55,7 @@ export const searchAlgolia = async <T>(
|
||||
}?${searchParams.toString()}`,
|
||||
{
|
||||
headers: params.headers,
|
||||
},
|
||||
}
|
||||
)
|
||||
.then((response) => response.data);
|
||||
};
|
||||
|
@ -28,14 +28,14 @@ export const searchHowLongToBeat = async (gameName: string) => {
|
||||
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36",
|
||||
Referer: "https://howlongtobeat.com/",
|
||||
},
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
return response.data as HowLongToBeatSearchResponse;
|
||||
};
|
||||
|
||||
export const getHowLongToBeatGame = async (
|
||||
id: string,
|
||||
id: string
|
||||
): Promise<HowLongToBeatCategory[]> => {
|
||||
const response = await requestWebPage(`https://howlongtobeat.com/game/${id}`);
|
||||
|
||||
|
@ -56,7 +56,7 @@ export function App() {
|
||||
}
|
||||
|
||||
addPacket(downloadProgress);
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
return () => {
|
||||
@ -77,7 +77,7 @@ export function App() {
|
||||
replace: location.pathname.startsWith("/search"),
|
||||
});
|
||||
},
|
||||
[dispatch, location.pathname, navigate],
|
||||
[dispatch, location.pathname, navigate]
|
||||
);
|
||||
|
||||
const handleClear = useCallback(() => {
|
||||
|
@ -39,7 +39,7 @@ export function Downloads() {
|
||||
}, [library]);
|
||||
|
||||
const openGame = (gameId: number) =>
|
||||
window.electron.openGame(gameId).then(isBinaryInPath => {
|
||||
window.electron.openGame(gameId).then((isBinaryInPath) => {
|
||||
if (!isBinaryInPath) setShowBinaryNotFoundModal(true);
|
||||
updateLibrary();
|
||||
});
|
||||
@ -205,7 +205,10 @@ export function Downloads() {
|
||||
|
||||
return (
|
||||
<section className={styles.downloadsContainer}>
|
||||
<BinaryNotFoundModal visible={showBinaryNotFoundModal} onClose={() => setShowBinaryNotFoundModal(false)} />
|
||||
<BinaryNotFoundModal
|
||||
visible={showBinaryNotFoundModal}
|
||||
onClose={() => setShowBinaryNotFoundModal(false)}
|
||||
/>
|
||||
<TextField placeholder={t("filter")} onChange={handleFilter} />
|
||||
|
||||
<ul className={styles.downloads}>
|
||||
|
@ -104,12 +104,12 @@ export function GameDetails() {
|
||||
shop,
|
||||
encodeURIComponent(gameDetails?.name),
|
||||
i18n.language,
|
||||
]),
|
||||
])
|
||||
),
|
||||
});
|
||||
|
||||
navigator.clipboard.writeText(
|
||||
OPEN_HYDRA_URL + `/?${searchParams.toString()}`,
|
||||
OPEN_HYDRA_URL + `/?${searchParams.toString()}`
|
||||
);
|
||||
|
||||
const zero = performance.now();
|
||||
@ -135,7 +135,7 @@ export function GameDetails() {
|
||||
repackId,
|
||||
gameDetails.objectID,
|
||||
gameDetails.name,
|
||||
shop as GameShop,
|
||||
shop as GameShop
|
||||
).then(() => {
|
||||
getGame();
|
||||
setShowRepacksModal(false);
|
||||
|
@ -49,7 +49,7 @@ export function HeroPanel({
|
||||
const isGameDownloading = isDownloading && gameDownloading?.id === game?.id;
|
||||
|
||||
const openGame = (gameId: number) =>
|
||||
window.electron.openGame(gameId).then(isBinaryInPath => {
|
||||
window.electron.openGame(gameId).then((isBinaryInPath) => {
|
||||
if (!isBinaryInPath) setShowBinaryNotFoundModal(true);
|
||||
updateLibrary();
|
||||
});
|
||||
@ -206,7 +206,10 @@ export function HeroPanel({
|
||||
|
||||
return (
|
||||
<div style={{ backgroundColor: color }} className={styles.panel}>
|
||||
<BinaryNotFoundModal visible={showBinaryNotFoundModal} onClose={() => setShowBinaryNotFoundModal(false)} />
|
||||
<BinaryNotFoundModal
|
||||
visible={showBinaryNotFoundModal}
|
||||
onClose={() => setShowBinaryNotFoundModal(false)}
|
||||
/>
|
||||
<div className={styles.content}>{getInfo()}</div>
|
||||
<div className={styles.actions}>{getActions()}</div>
|
||||
</div>
|
||||
|
@ -56,8 +56,8 @@ export function RepacksModal({
|
||||
gameDetails.repacks.filter((repack) =>
|
||||
repack.title
|
||||
.toLowerCase()
|
||||
.includes(event.target.value.toLocaleLowerCase()),
|
||||
),
|
||||
.includes(event.target.value.toLocaleLowerCase())
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Modal } from "@renderer/components"
|
||||
import { Modal } from "@renderer/components";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
interface BinaryNotFoundModalProps {
|
||||
@ -8,12 +8,12 @@ interface BinaryNotFoundModalProps {
|
||||
|
||||
export const BinaryNotFoundModal = ({
|
||||
visible,
|
||||
onClose
|
||||
onClose,
|
||||
}: BinaryNotFoundModalProps) => {
|
||||
const { t } = useTranslation("binary_not_found_modal");
|
||||
|
||||
return (
|
||||
<Modal
|
||||
<Modal
|
||||
visible={visible}
|
||||
title={t("title")}
|
||||
description={t("description")}
|
||||
@ -21,5 +21,5 @@ export const BinaryNotFoundModal = ({
|
||||
>
|
||||
{t("instructions")}
|
||||
</Modal>
|
||||
)
|
||||
}
|
||||
);
|
||||
};
|
||||
|
@ -1,20 +1,20 @@
|
||||
import type { ModuleOptions } from 'webpack';
|
||||
import type { ModuleOptions } from "webpack";
|
||||
|
||||
export const rules: Required<ModuleOptions>['rules'] = [
|
||||
export const rules: Required<ModuleOptions>["rules"] = [
|
||||
// Add support for native node modules
|
||||
{
|
||||
// We're specifying native_modules in the test because the asset relocator loader generates a
|
||||
// "fake" .node file which is really a cjs file.
|
||||
test: /native_modules[/\\].+\.node$/,
|
||||
use: 'node-loader',
|
||||
use: "node-loader",
|
||||
},
|
||||
{
|
||||
test: /[/\\]node_modules[/\\].+\.(m?js|node)$/,
|
||||
parser: { amd: false },
|
||||
use: {
|
||||
loader: '@vercel/webpack-asset-relocator-loader',
|
||||
loader: "@vercel/webpack-asset-relocator-loader",
|
||||
options: {
|
||||
outputAssetBase: 'native_modules',
|
||||
outputAssetBase: "native_modules",
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -22,7 +22,7 @@ export const rules: Required<ModuleOptions>['rules'] = [
|
||||
test: /\.tsx?$/,
|
||||
exclude: /(node_modules|\.webpack)/,
|
||||
use: {
|
||||
loader: 'ts-loader',
|
||||
loader: "ts-loader",
|
||||
options: {
|
||||
transpileOnly: true,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user