mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
refactor: event manager (#17862)
* refactor: event manager * refactor: event manager
This commit is contained in:
parent
e822e3eca9
commit
d0014bdf94
12 changed files with 127 additions and 47 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import { eventManager } from '$lib/stores/event-manager.svelte';
|
||||
import type {
|
||||
AlbumResponseDto,
|
||||
ServerAboutResponseDto,
|
||||
|
|
@ -19,8 +20,10 @@ const defaultUserInteraction: UserInteractions = {
|
|||
serverInfo: undefined,
|
||||
};
|
||||
|
||||
export const resetUserInteraction = () => {
|
||||
export const userInteraction = $state<UserInteractions>(defaultUserInteraction);
|
||||
|
||||
const reset = () => {
|
||||
Object.assign(userInteraction, defaultUserInteraction);
|
||||
};
|
||||
|
||||
export const userInteraction = $state<UserInteractions>(defaultUserInteraction);
|
||||
eventManager.on('auth.logout', () => reset());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue