+
-
{:else}
No {$currentPlatform} games found.
@@ -37,6 +34,14 @@
\ No newline at end of file
diff --git a/src/components/core/games/list-view/VirtualList.svelte b/src/components/core/games/list-view/VirtualList.svelte
index 1a331432..055079aa 100644
--- a/src/components/core/games/list-view/VirtualList.svelte
+++ b/src/components/core/games/list-view/VirtualList.svelte
@@ -1,8 +1,8 @@
-
-
-
+
+
{#each visible as row (row.index)}
Missing template
diff --git a/src/lib/controllers/AppController.ts b/src/lib/controllers/AppController.ts
index 878799aa..880a53ba 100644
--- a/src/lib/controllers/AppController.ts
+++ b/src/lib/controllers/AppController.ts
@@ -20,7 +20,7 @@ import { ToastController } from "./ToastController";
import { SettingsManager } from "../utils/SettingsManager";
import { LogController } from "./LogController";
import { get } from "svelte/store";
-import { GridTypes, Platforms, activeUserId, appLibraryCache, canSave, currentPlatform, customGameNames, gridType, hiddenGameIds, isOnline, loadingGames, manualSteamGames, needsSGDBAPIKey, needsSteamKey, nonSteamGames, originalAppLibraryCache, originalLogoPositions, originalSteamShortcuts, renderGamesInList, selectedGameAppId, selectedGameName, steamGames, steamGridDBKey, steamKey, steamLogoPositions, steamShortcuts, steamUsers, theme } from "../../stores/AppState";
+import { GridTypes, Platforms, activeUserId, appLibraryCache, canSave, currentPlatform, customGameNames, gridType, hiddenGameIds, isOnline, loadingGames, manualSteamGames, needsSGDBAPIKey, needsSteamKey, nonSteamGames, originalAppLibraryCache, originalLogoPositions, originalSteamShortcuts, renderGamesInList, selectedGameAppId, selectedGameName, showHidden, steamGames, steamGridDBKey, steamKey, steamLogoPositions, steamShortcuts, steamUsers, theme } from "../../stores/AppState";
import { cleanConflicts, gameSearchModalCancel, gameSearchModalDefault, gameSearchModalSelect, gridModalInfo, showCleanConflictDialog, showGameSearchModal, showGridModal, showSettingsModal } from "../../stores/Modals";
import { CacheController } from "./CacheController";
import { RustInterop } from "./RustInterop";
@@ -70,6 +70,7 @@ export class AppController {
document.body.setAttribute("data-theme", settings.theme === 0 ? "dark" : "light");
renderGamesInList.set(settings.gameViewType === 1);
+ showHidden.set(settings.showHiddenGames);
await findSteamPath(settings.steamInstallPath);
@@ -86,7 +87,7 @@ export class AppController {
await exit(0);
}
- //? need to clean the data here bc props can vary in terms of case
+ // ? need to clean the data here bc props can vary in terms of case
for (const [ id, user ] of Object.entries(users)) {
const userKeys = Object.keys(user);
const lowerCaseUser = Object.fromEntries(userKeys.map((key: string) => [ key.toLowerCase(), user[key] ]));
diff --git a/src/lib/utils/SettingsManager.ts b/src/lib/utils/SettingsManager.ts
index 4e87091f..44ecee9f 100644
--- a/src/lib/utils/SettingsManager.ts
+++ b/src/lib/utils/SettingsManager.ts
@@ -18,7 +18,20 @@
import { fs, path } from "@tauri-apps/api";
import { LogController } from "../controllers/LogController";
-const DEFAULT_SETTINGS = "{ \"version\": \"\", \"steamInstallPath\": \"\", \"shownShortcutPrompt\": false, \"theme\": 0, \"gameViewType\": 0, \"steamGridDbApiKey\": \"\", \"steamApiKeyMap\": {}, \"hiddenGameIds\": [], \"manualSteamGames\": [], \"customGameName\": {} }";
+const DEFAULT_SETTINGS = `{
+ "version": "",
+ "steamInstallPath": "",
+ "shownShortcutPrompt": false,
+ "steamGridDbApiKey": "",
+ "steamApiKeyMap": {},
+ "hiddenGameIds": [],
+ "manualSteamGames": [],
+ "customGameName": {},
+
+ "theme": 0,
+ "gameViewType": 0,
+ "showHiddenGames": false
+}`;
/**
* A class for managing application settings
diff --git a/src/types/global.d.ts b/src/types/global.d.ts
index bdd25d47..cd80e0d4 100644
--- a/src/types/global.d.ts
+++ b/src/types/global.d.ts
@@ -7,13 +7,15 @@ type AppSettings = {
version: string,
steamInstallPath: string,
shownShortcutPrompt: boolean,
- theme: number,
- gameViewType: number,
steamGridDbApiKey: string,
steamApiKeyMap: { [userId32: string]: string },
hiddenGameIds: [],
manualSteamGames: GameStruct[],
- customGameNames: { [appId: string]: string }
+ customGameNames: { [appId: string]: string },
+
+ theme: number,
+ gameViewType: number,
+ showHiddenGames: boolean,
};
type LibraryCacheEntry = {
diff --git a/src/windows/main/Main.svelte b/src/windows/main/Main.svelte
index fa5ccaf8..edd0f2fc 100644
--- a/src/windows/main/Main.svelte
+++ b/src/windows/main/Main.svelte
@@ -10,7 +10,7 @@
import Grids from "../../components/core/grids/Grids.svelte";
import { AppController } from "../../lib/controllers/AppController";
import { exit } from "@tauri-apps/api/process";
- import { activeUserId, isOnline, steamUsers } from "../../stores/AppState";
+ import { activeUserId, isOnline, showHidden, steamUsers } from "../../stores/AppState";
import { showManualGamesModal, showBatchApplyModal, showBatchApplyProgress, showGridModal, showLogoPositionModal, showSettingsModal, showCleanGridsModal, showCleanConflictDialog, showUpdateModal, updateManifest, showDialogModal, showSteamPathModal, showGameSearchModal } from "../../stores/Modals";
import DropDown from "../../components/interactables/DropDown.svelte";
import type { Unsubscriber } from "svelte/store";
@@ -27,10 +27,12 @@
import DialogModal from "../../components/modals/DialogModal.svelte";
import SteamPathModal from "../../components/modals/SteamPathModal.svelte";
import GameSearchModal from "../../components/modals/game-search/GameSearchModal.svelte";
+ import { SettingsManager } from "../../lib/utils/SettingsManager";
let updateUnsub: any;
let activeUserIdUnsub: Unsubscriber;
let usersUnsub: Unsubscriber;
+ let showHiddenUnsub: Unsubscriber;
let users = Object.values($steamUsers).map((user) => {
return {
@@ -68,6 +70,9 @@
});
if (!selectedUserId) selectedUserId = $activeUserId.toString();
});
+ showHiddenUnsub = showHidden.subscribe((show) => {
+ SettingsManager.updateSetting("showHiddenGames", show);
+ });
let i = 0;
@@ -103,6 +108,7 @@
if (updateUnsub) updateUnsub()
if (activeUserIdUnsub) activeUserIdUnsub();
if (usersUnsub) usersUnsub();
+ if (showHiddenUnsub) showHiddenUnsub();
});