mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
27 lines
683 B
TypeScript
27 lines
683 B
TypeScript
|
|
import type {
|
||
|
|
AlbumResponseDto,
|
||
|
|
ServerAboutResponseDto,
|
||
|
|
ServerStorageResponseDto,
|
||
|
|
ServerVersionHistoryResponseDto,
|
||
|
|
} from '@immich/sdk';
|
||
|
|
|
||
|
|
interface UserInteractions {
|
||
|
|
recentAlbums?: AlbumResponseDto[];
|
||
|
|
versions?: ServerVersionHistoryResponseDto[];
|
||
|
|
aboutInfo?: ServerAboutResponseDto;
|
||
|
|
serverInfo?: ServerStorageResponseDto;
|
||
|
|
}
|
||
|
|
|
||
|
|
const defaultUserInteraction: UserInteractions = {
|
||
|
|
recentAlbums: undefined,
|
||
|
|
versions: undefined,
|
||
|
|
aboutInfo: undefined,
|
||
|
|
serverInfo: undefined,
|
||
|
|
};
|
||
|
|
|
||
|
|
export const resetUserInteraction = () => {
|
||
|
|
Object.assign(userInteraction, defaultUserInteraction);
|
||
|
|
};
|
||
|
|
|
||
|
|
export const userInteraction = $state<UserInteractions>(defaultUserInteraction);
|