diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index 24de88cf..14fba932 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -379,6 +379,7 @@ "installing_common_redist": "Installing…", "show_download_speed_in_megabytes": "Show download speed in megabytes per second", "extract_files_by_default": "Extract files by default after download", + "enable_steam_achievements": "Enable search for Steam achievements", "achievement_custom_notification_position": "Achievement custom notification position", "top-left": "Top left", "top-center": "Top center", diff --git a/src/locales/pt-BR/translation.json b/src/locales/pt-BR/translation.json index 8373b415..1f6adcd0 100644 --- a/src/locales/pt-BR/translation.json +++ b/src/locales/pt-BR/translation.json @@ -364,6 +364,7 @@ "installing_common_redist": "Instalando…", "show_download_speed_in_megabytes": "Exibir taxas de download em megabytes por segundo", "extract_files_by_default": "Extrair arquivos automaticamente após o download", + "enable_steam_achievements": "Habilitar busca por conquistas da Steam", "enable_achievement_custom_notifications": "Habilitar notificações customizadas de conquistas", "top-left": "Superior esquerdo", "top-center": "Superior central", diff --git a/src/main/services/achievements/find-achivement-files.ts b/src/main/services/achievements/find-achivement-files.ts index 183f6ba9..26d44170 100644 --- a/src/main/services/achievements/find-achivement-files.ts +++ b/src/main/services/achievements/find-achivement-files.ts @@ -1,10 +1,11 @@ import path from "node:path"; import fs from "node:fs"; -import type { Game, AchievementFile } from "@types"; +import type { Game, AchievementFile, UserPreferences } from "@types"; import { Cracker } from "@shared"; import { achievementsLogger } from "../logger"; import { SystemPath } from "../system-path"; import { getSteamLocation, getSteamUsersIds } from "../steam"; +import { db, levelKeys } from "@main/level"; const getAppDataPath = () => { if (process.platform === "win32") { @@ -285,6 +286,17 @@ export const findAchievementFileInSteamPath = async (game: Game) => { return []; } + const userPreferences = await db.get( + levelKeys.userPreferences, + { + valueEncoding: "json", + } + ); + + if (!userPreferences?.enableSteamAchievements) { + return []; + } + const achievementFiles: AchievementFile[] = []; for (const steamUserId of steamUserIds) { diff --git a/src/main/services/window-manager.ts b/src/main/services/window-manager.ts index 35a52397..dfcfc3ba 100644 --- a/src/main/services/window-manager.ts +++ b/src/main/services/window-manager.ts @@ -582,7 +582,7 @@ export class WindowManager { tray.popUpContextMenu(contextMenu); }; - tray.setToolTip("Hydra"); + tray.setToolTip("Hydra Launcher"); if (process.platform !== "darwin") { await updateSystemTray(); diff --git a/src/renderer/index.html b/src/renderer/index.html index 5d62f4c5..42166e56 100644 --- a/src/renderer/index.html +++ b/src/renderer/index.html @@ -3,7 +3,7 @@ - Hydra + Hydra Launcher + +
+ + handleChange({ + enableSteamAchievements: !form.enableSteamAchievements, + }) + } + /> + + + + +
); } diff --git a/src/types/level.types.ts b/src/types/level.types.ts index 13f59c7f..e99641fe 100644 --- a/src/types/level.types.ts +++ b/src/types/level.types.ts @@ -101,6 +101,7 @@ export interface UserPreferences { friendStartGameNotificationsEnabled?: boolean; showDownloadSpeedInMegabytes?: boolean; extractFilesByDefault?: boolean; + enableSteamAchievements?: boolean; } export interface ScreenState {