diff --git a/src/main/main.ts b/src/main/main.ts index 6fc2b216..1c203889 100644 --- a/src/main/main.ts +++ b/src/main/main.ts @@ -17,6 +17,7 @@ import { Lock, DeckyPlugin, DownloadSourcesChecker, + WSClient, } from "@main/services"; import { migrateDownloadSources } from "./helpers/migrate-download-sources"; @@ -60,7 +61,8 @@ export const loadState = async () => { // Check for new download options on startup DownloadSourcesChecker.checkForChanges(); - // WSClient.connect(); + + WSClient.connect(); }); const downloads = await downloadsSublevel diff --git a/src/renderer/src/features/library-slice.ts b/src/renderer/src/features/library-slice.ts index 9c399dbe..9e671e34 100644 --- a/src/renderer/src/features/library-slice.ts +++ b/src/renderer/src/features/library-slice.ts @@ -5,10 +5,12 @@ import type { LibraryGame } from "@types"; export interface LibraryState { value: LibraryGame[]; + searchQuery: string; } const initialState: LibraryState = { value: [], + searchQuery: "", }; export const librarySlice = createSlice({ @@ -36,6 +38,9 @@ export const librarySlice = createSlice({ game.newDownloadOptionsCount = undefined; } }, + setLibrarySearchQuery: (state, action: PayloadAction) => { + state.searchQuery = action.payload; + }, }, }); @@ -43,4 +48,5 @@ export const { setLibrary, updateGameNewDownloadOptions, clearNewDownloadOptions, + setLibrarySearchQuery, } = librarySlice.actions;