mirror of
https://github.com/immich-app/immich.git
synced 2025-05-17 05:02:16 +02:00
17 lines
385 B
TypeScript
17 lines
385 B
TypeScript
import { eventManager } from '$lib/stores/event-manager.svelte';
|
|
|
|
class SearchStore {
|
|
savedSearchTerms = $state<string[]>([]);
|
|
isSearchEnabled = $state(false);
|
|
|
|
constructor() {
|
|
eventManager.on('auth.logout', () => this.clearCache());
|
|
}
|
|
|
|
clearCache() {
|
|
this.savedSearchTerms = [];
|
|
this.isSearchEnabled = false;
|
|
}
|
|
}
|
|
|
|
export const searchStore = new SearchStore();
|