fix(web): reset search history after logout ()

fix(web): reset search suggestions after logout
This commit is contained in:
Ben 2025-04-10 16:34:45 -04:00 committed by GitHub
parent 75c83cb704
commit 92f0973a46
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 41 additions and 28 deletions
web/src/lib/components/photos-page

View file

@ -6,7 +6,7 @@
import { assetViewingStore } from '$lib/stores/asset-viewing.store';
import { AssetBucket, assetsSnapshot, AssetStore, isSelectingAllAssets } from '$lib/stores/assets-store.svelte';
import { showDeleteModal } from '$lib/stores/preferences.store';
import { isSearchEnabled } from '$lib/stores/search.store';
import { searchStore } from '$lib/stores/search.svelte';
import { featureFlags } from '$lib/stores/server-config.store';
import { handlePromiseError } from '$lib/utils';
import { deleteAssets, updateStackedAssetInTimeline, updateUnstackedAssetInTimeline } from '$lib/utils/actions';
@ -425,7 +425,7 @@
};
const onKeyDown = (event: KeyboardEvent) => {
if ($isSearchEnabled) {
if (searchStore.isSearchEnabled) {
return;
}
@ -436,7 +436,7 @@
};
const onKeyUp = (event: KeyboardEvent) => {
if ($isSearchEnabled) {
if (searchStore.isSearchEnabled) {
return;
}
@ -625,7 +625,7 @@
let shortcutList = $derived(
(() => {
if ($isSearchEnabled || $showAssetViewer) {
if (searchStore.isSearchEnabled || $showAssetViewer) {
return [];
}