mirror of
https://github.com/immich-app/immich.git
synced 2025-11-24 23:35:18 -05:00
18 lines
386 B
TypeScript
18 lines
386 B
TypeScript
import { eventManager } from '$lib/managers/event-manager.svelte';
|
|
|
|
class SearchStore {
|
|
savedSearchTerms = $state<string[]>([]);
|
|
isSearchEnabled = $state(false);
|
|
|
|
constructor() {
|
|
eventManager.on('AuthLogout', () => this.clearCache());
|
|
}
|
|
|
|
clearCache() {
|
|
this.savedSearchTerms = [];
|
|
this.isSearchEnabled = false;
|
|
}
|
|
}
|
|
|
|
export const searchStore = new SearchStore();
|