mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-19 17:23:57 +00:00
Merge branch 'hydralauncher:main' into main
This commit is contained in:
@@ -11,7 +11,7 @@ const addGameToLibrary = async (
|
||||
objectID: string,
|
||||
title: string,
|
||||
gameShop: GameShop,
|
||||
executablePath: string
|
||||
executablePath: string | null
|
||||
) => {
|
||||
const game = await gameRepository.findOne({
|
||||
where: {
|
||||
|
||||
@@ -5,7 +5,11 @@ import { registerEvent } from "../register-event";
|
||||
const showOpenDialog = async (
|
||||
_event: Electron.IpcMainInvokeEvent,
|
||||
options: Electron.OpenDialogOptions
|
||||
) => dialog.showOpenDialog(WindowManager.mainWindow, options);
|
||||
) => {
|
||||
if (WindowManager.mainWindow) {
|
||||
dialog.showOpenDialog(WindowManager.mainWindow, options);
|
||||
}
|
||||
};
|
||||
|
||||
registerEvent(showOpenDialog, {
|
||||
name: "showOpenDialog",
|
||||
|
||||
@@ -85,7 +85,7 @@ app.on("second-instance", (_event, commandLine) => {
|
||||
WindowManager.createMainWindow();
|
||||
}
|
||||
|
||||
const [, path] = commandLine.pop().split("://");
|
||||
const [, path] = commandLine.pop()?.split("://") ?? [];
|
||||
if (path) WindowManager.redirect(path);
|
||||
});
|
||||
|
||||
|
||||
@@ -41,7 +41,8 @@ export const getSteam250List = async () => {
|
||||
).flat();
|
||||
|
||||
const gamesMap: Map<string, Steam250Game> = gamesList.reduce((map, item) => {
|
||||
map.set(item.objectID, item);
|
||||
if (item) map.set(item.objectID, item);
|
||||
|
||||
return map;
|
||||
}, new Map());
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BrowserWindow, Menu, Notification, Tray, app } from "electron";
|
||||
import { BrowserWindow, Menu, Tray, app } from "electron";
|
||||
import { is } from "@electron-toolkit/utils";
|
||||
import { t } from "i18next";
|
||||
import path from "node:path";
|
||||
|
||||
Reference in New Issue
Block a user