diff --git a/web/src/lib/components/shared-components/search-bar/search-bar.svelte b/web/src/lib/components/shared-components/search-bar/search-bar.svelte index 7e52b6b7b4..3ca9e35832 100644 --- a/web/src/lib/components/shared-components/search-bar/search-bar.svelte +++ b/web/src/lib/components/shared-components/search-bar/search-bar.svelte @@ -2,12 +2,7 @@ import { AppRoute } from '$lib/constants'; import Icon from '$lib/components/elements/icon.svelte'; import { goto } from '$app/navigation'; - import { - isSearchEnabled, - preventRaceConditionSearchBar, - savedSearchTerms, - searchQuery, - } from '$lib/stores/search.store'; + import { isSearchEnabled, preventRaceConditionSearchBar, savedSearchTerms } from '$lib/stores/search.store'; import { clickOutside } from '$lib/utils/click-outside'; import { mdiClose, mdiMagnify, mdiTune } from '@mdi/js'; import IconButton from '$lib/components/elements/buttons/icon-button.svelte'; @@ -15,8 +10,10 @@ import SearchFilterBox from './search-filter-box.svelte'; import type { MetadataSearchDto, SmartSearchDto } from '@immich/sdk'; import { getMetadataSearchQuery } from '$lib/utils/metadata-search'; + export let value = ''; export let grayTheme: boolean; + export let searchQuery: MetadataSearchDto | SmartSearchDto = {}; let input: HTMLInputElement; @@ -30,8 +27,7 @@ showHistory = false; showFilter = false; $isSearchEnabled = false; - $searchQuery = payload; - goto(`${AppRoute.SEARCH}?${params}`, { invalidateAll: true }); + goto(`${AppRoute.SEARCH}?${params}`); }; const clearSearchTerm = (searchTerm: string) => { @@ -87,11 +83,11 @@ }; -
MEDIA TYPE
diff --git a/web/src/lib/constants.ts b/web/src/lib/constants.ts index 239df2f844..6608550200 100644 --- a/web/src/lib/constants.ts +++ b/web/src/lib/constants.ts @@ -69,7 +69,6 @@ export enum QueryParameter { PREVIOUS_ROUTE = 'previousRoute', QUERY = 'query', SEARCHED_PEOPLE = 'searchedPeople', - SEARCH_TERM = 'q', SMART_SEARCH = 'smartSearch', PAGE = 'page', } diff --git a/web/src/lib/stores/search.store.ts b/web/src/lib/stores/search.store.ts index ded7dc17ae..41fd287f4c 100644 --- a/web/src/lib/stores/search.store.ts +++ b/web/src/lib/stores/search.store.ts @@ -1,8 +1,6 @@ -import type { MetadataSearchDto, SmartSearchDto } from '@immich/sdk'; import { persisted } from 'svelte-local-storage-store'; import { writable } from 'svelte/store'; export const savedSearchTerms = persisted