From 5c7a28929910cd08a7bd0690d5c6b78c276b6d9f Mon Sep 17 00:00:00 2001 From: Chubby Granny Chaser Date: Wed, 14 May 2025 10:17:44 +0100 Subject: [PATCH] fix: adding greptile fixes --- src/locales/en/translation.json | 2 +- src/main/services/steam.ts | 8 ++++---- .../src/pages/game-details/modals/game-options-modal.tsx | 2 +- src/types/steam.types.ts | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index 675f691f..2902218e 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -134,7 +134,7 @@ "create_shortcut_success": "Shortcut created successfully", "you_might_need_to_restart_steam": "You might need to restart Steam to see the changes", "create_shortcut_error": "Error creating shortcut", - "nsfw_content_title": "This game contains innapropriate content", + "nsfw_content_title": "This game contains inappropriate content", "nsfw_content_description": "{{title}} contains content that may not be suitable for all ages. Are you sure you want to continue?", "allow_nsfw_content": "Continue", "refuse_nsfw_content": "Go back", diff --git a/src/main/services/steam.ts b/src/main/services/steam.ts index 3b655b1a..70653fd0 100644 --- a/src/main/services/steam.ts +++ b/src/main/services/steam.ts @@ -17,7 +17,7 @@ export interface SteamAppDetailsResponse { }; } -export const getSteamLocation = async (): Promise => { +export const getSteamLocation = async () => { if (process.platform === "linux") { return path.join(SystemPath.getPath("home"), ".local", "share", "Steam"); } @@ -36,7 +36,7 @@ export const getSteamLocation = async (): Promise => { key: "\\Software\\Valve\\Steam", }); - return new Promise((resolve, reject) => { + return new Promise((resolve, reject) => { regKey.get("SteamPath", (err, value) => { if (err) { reject(err); @@ -137,7 +137,7 @@ export const composeSteamShortcut = ( Devkit: false, DevkitGameID: "", DevkitOverrideAppID: false, - LastPlayTime: false, + LastPlayTime: 0, FlatpakAppID: "", }; }; @@ -148,7 +148,7 @@ export const writeSteamShortcuts = async ( ) => { const buffer = writeBuffer({ shortcuts }); - fs.writeFileSync( + return fs.promises.writeFile( path.join( await getSteamLocation(), "userdata", diff --git a/src/renderer/src/pages/game-details/modals/game-options-modal.tsx b/src/renderer/src/pages/game-details/modals/game-options-modal.tsx index 6ccfb627..4c415f7b 100644 --- a/src/renderer/src/pages/game-details/modals/game-options-modal.tsx +++ b/src/renderer/src/pages/game-details/modals/game-options-modal.tsx @@ -328,7 +328,7 @@ export function GameOptionsModal({ theme="outline" disabled={creatingSteamShortcut} > - + {t("create_steam_shortcut")} {shouldShowCreateStartMenuShortcut && ( diff --git a/src/types/steam.types.ts b/src/types/steam.types.ts index b75aa84d..2721bb47 100644 --- a/src/types/steam.types.ts +++ b/src/types/steam.types.ts @@ -69,6 +69,6 @@ export interface SteamShortcut { Devkit: boolean; DevkitGameID: string; DevkitOverrideAppID: boolean; - LastPlayTime: boolean; + LastPlayTime: number; FlatpakAppID: string; }