Skip to content

Commit

Permalink
change button to top
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinDiasMoreira committed Feb 4, 2025
2 parents bc31a28 + 70fcc6e commit 026abd7
Show file tree
Hide file tree
Showing 191 changed files with 4,900 additions and 4,672 deletions.
2 changes: 0 additions & 2 deletions electron.vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
externalizeDepsPlugin,
} from "electron-vite";
import react from "@vitejs/plugin-react";
import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin";
import svgr from "vite-plugin-svgr";
import { sentryVitePlugin } from "@sentry/vite-plugin";

Expand Down Expand Up @@ -55,7 +54,6 @@ export default defineConfig(({ mode }) => {
plugins: [
svgr(),
react(),
vanillaExtractPlugin(),
sentryVitePlugin({
authToken: process.env.SENTRY_AUTH_TOKEN,
org: "hydra-launcher",
Expand Down
13 changes: 4 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@
"@reduxjs/toolkit": "^2.2.3",
"@sentry/react": "^8.47.0",
"@sentry/vite-plugin": "^2.22.7",
"@vanilla-extract/css": "^1.14.2",
"@vanilla-extract/dynamic": "^2.1.2",
"@vanilla-extract/recipes": "^0.5.2",
"auto-launch": "^5.0.6",
"axios": "^1.7.9",
"better-sqlite3": "^11.7.0",
Expand Down Expand Up @@ -90,24 +87,22 @@
"@swc/core": "^1.4.16",
"@types/auto-launch": "^5.0.5",
"@types/color": "^3.0.6",
"@types/folder-hash": "^4.0.4",
"@types/jsdom": "^21.1.7",
"@types/jsonwebtoken": "^9.0.7",
"@types/jsonwebtoken": "^9.0.8",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.12.7",
"@types/parse-torrent": "^5.8.7",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"@types/sound-play": "^1.1.3",
"@types/user-agents": "^1.0.4",
"@vanilla-extract/vite-plugin": "^4.0.7",
"@vitejs/plugin-react": "^4.2.1",
"electron": "^31.7.6",
"electron": "^31.7.7",
"electron-builder": "^25.1.8",
"electron-vite": "^2.0.0",
"electron-vite": "^2.3.0",
"eslint": "^8.56.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react": "^7.37.4",
"eslint-plugin-react-hooks": "^4.6.0",
"husky": "^9.1.7",
"prettier": "^3.4.2",
Expand Down
2 changes: 1 addition & 1 deletion seeds/steam-games.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/main/events/library/add-game-to-library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ const addGameToLibrary = async (

await gamesSublevel.put(levelKeys.game(shop, objectId), game);

updateLocalUnlockedAchivements(game!);
updateLocalUnlockedAchivements(game);

createGame(game!).catch(() => {});
createGame(game).catch(() => {});
}
};

Expand Down
1 change: 0 additions & 1 deletion src/main/level/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export { db } from "./level";

export * from "./sublevels";
1 change: 0 additions & 1 deletion src/main/level/sublevels/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ export * from "./downloads";
export * from "./games";
export * from "./game-shop-cache";
export * from "./game-achievements";

export * from "./keys";
2 changes: 2 additions & 0 deletions src/main/services/download/download-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ export class DownloadManager {
});

WindowManager.mainWindow?.setProgressBar(-1);

if (downloadKey === this.downloadingGameId) {
WindowManager.mainWindow?.webContents.send("on-download-progress", null);
this.downloadingGameId = null;
}
}
Expand Down
28 changes: 13 additions & 15 deletions src/main/services/library-sync/merge-with-remote-games.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,20 @@ export const mergeWithRemoteGames = async () => {
name: "getById",
});

if (steamGame) {
const iconUrl = steamGame?.clientIcon
? steamUrlBuilder.icon(game.objectId, steamGame.clientIcon)
: null;
const iconUrl = steamGame?.clientIcon
? steamUrlBuilder.icon(game.objectId, steamGame.clientIcon)
: null;

gamesSublevel.put(levelKeys.game(game.shop, game.objectId), {
objectId: game.objectId,
title: steamGame?.name,
remoteId: game.id,
shop: game.shop,
iconUrl,
lastTimePlayed: game.lastTimePlayed,
playTimeInMilliseconds: game.playTimeInMilliseconds,
isDeleted: false,
});
}
gamesSublevel.put(levelKeys.game(game.shop, game.objectId), {
objectId: game.objectId,
title: steamGame?.name,
remoteId: game.id,
shop: game.shop,
iconUrl,
lastTimePlayed: game.lastTimePlayed,
playTimeInMilliseconds: game.playTimeInMilliseconds,
isDeleted: false,
});
}
}
})
Expand Down
11 changes: 9 additions & 2 deletions src/main/services/steam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,18 @@ export const getSteamAppDetails = async (
});

return axios
.get(
.get<SteamAppDetailsResponse>(
`http://store.steampowered.com/api/appdetails?${searchParams.toString()}`
)
.then((response) => {
if (response.data[objectId].success) return response.data[objectId].data;
if (response.data[objectId].success) {
const data = response.data[objectId].data;
return {
...data,
objectId,
};
}

return null;
})
.catch((err) => {
Expand Down
4 changes: 2 additions & 2 deletions src/preload/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ contextBridge.exposeInMainWorld("electron", {
ipcRenderer.invoke("pauseGameSeed", shop, objectId),
resumeGameSeed: (shop: GameShop, objectId: string) =>
ipcRenderer.invoke("resumeGameSeed", shop, objectId),
onDownloadProgress: (cb: (value: DownloadProgress) => void) => {
onDownloadProgress: (cb: (value: DownloadProgress | null) => void) => {
const listener = (
_event: Electron.IpcRendererEvent,
value: DownloadProgress
value: DownloadProgress | null
) => cb(value);
ipcRenderer.on("on-download-progress", listener);
return () => ipcRenderer.removeListener("on-download-progress", listener);
Expand Down
134 changes: 0 additions & 134 deletions src/renderer/src/app.css.ts

This file was deleted.

Loading

0 comments on commit 026abd7

Please sign in to comment.