Compare commits

...

5 Commits

Author SHA1 Message Date
Zamitto
01ac5239dc fix: steam user path not found
Some checks failed
Release / build (ubuntu-latest) (push) Has been cancelled
Release / build (windows-latest) (push) Has been cancelled
2025-09-06 12:34:07 -03:00
Zamitto
1dc2176813 chore: bump version
Some checks failed
Release / build (ubuntu-latest) (push) Has been cancelled
Release / build (windows-latest) (push) Has been cancelled
2025-09-03 06:52:44 -03:00
Zamitto
a7ec632a21 fix: window not opening sometimes when clicking on tray 2025-09-03 06:49:26 -03:00
Zamitto
2b6d8eba78 fix: window not opening when clicking on tray icon on linux 2025-09-03 06:05:02 -03:00
Zamitto
6bc6a10d66 chore: testing aur package pipeline
Some checks failed
Release / build (ubuntu-latest) (push) Has been cancelled
Release / build (windows-latest) (push) Has been cancelled
2025-09-02 06:26:28 -03:00
5 changed files with 30 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "hydralauncher",
"version": "3.6.6",
"version": "3.6.8",
"description": "Hydra",
"main": "./out/main/index.js",
"author": "Los Broxas",

View File

@@ -4,7 +4,6 @@ import { Downloader } from "@shared";
import { levelKeys, db } from "./level";
import type { UserPreferences } from "@types";
import {
WSClient,
SystemPath,
CommonRedistManager,
TorBoxClient,
@@ -47,7 +46,7 @@ export const loadState = async () => {
await HydraApi.setupApi().then(() => {
uploadGamesBatch();
WSClient.connect();
// WSClient.connect();
});
const downloads = await downloadsSublevel

View File

@@ -11,7 +11,6 @@ import { getUserData } from "./user/get-user-data";
import { db } from "@main/level";
import { levelKeys } from "@main/level/sublevels";
import type { Auth, User } from "@types";
import { WSClient } from "./ws/ws-client";
interface HydraApiOptions {
needsAuth?: boolean;
@@ -103,8 +102,8 @@ export class HydraApi {
WindowManager.mainWindow.webContents.send("on-signin");
await clearGamesRemoteIds();
uploadGamesBatch();
WSClient.close();
WSClient.connect();
// WSClient.close();
// WSClient.connect();
}
}

View File

@@ -82,17 +82,19 @@ export const getSteamAppDetails = async (
};
export const getSteamUsersIds = async () => {
const userDataPath = await getSteamLocation().catch(() => null);
const steamLocation = await getSteamLocation().catch(() => null);
if (!userDataPath) {
if (!steamLocation) {
return [];
}
const userDataPath = path.join(steamLocation, "userdata");
if (!fs.existsSync(userDataPath)) {
return [];
}
const userIds = fs.readdirSync(path.join(userDataPath, "userdata"), {
const userIds = fs.readdirSync(userDataPath, {
withFileTypes: true,
});

View File

@@ -181,6 +181,9 @@ export class WindowManager {
});
this.mainWindow.on("close", async () => {
const mainWindow = this.mainWindow;
this.mainWindow = null;
const userPreferences = await db.get<string, UserPreferences>(
levelKeys.userPreferences,
{
@@ -188,9 +191,11 @@ export class WindowManager {
}
);
if (this.mainWindow) {
const lastBounds = this.mainWindow.getBounds();
const isMaximized = this.mainWindow.isMaximized() ?? false;
if (mainWindow) {
mainWindow.setProgressBar(-1);
const lastBounds = mainWindow.getBounds();
const isMaximized = mainWindow.isMaximized() ?? false;
const screenConfig = isMaximized
? {
x: undefined,
@@ -207,9 +212,6 @@ export class WindowManager {
if (userPreferences?.preferQuitInsteadOfHiding) {
app.quit();
}
WindowManager.mainWindow?.setProgressBar(-1);
WindowManager.mainWindow = null;
});
this.mainWindow.webContents.setWindowOpenHandler((handler) => {
@@ -584,7 +586,7 @@ export class WindowManager {
tray.setToolTip("Hydra Launcher");
if (process.platform !== "darwin") {
if (process.platform === "win32") {
await updateSystemTray();
tray.addListener("double-click", () => {
@@ -595,6 +597,18 @@ export class WindowManager {
}
});
tray.addListener("right-click", showContextMenu);
} else if (process.platform === "linux") {
await updateSystemTray();
tray.addListener("click", () => {
if (this.mainWindow) {
this.mainWindow.show();
} else {
this.createMainWindow();
}
});
tray.addListener("right-click", showContextMenu);
} else {
tray.addListener("click", showContextMenu);