1
0
mirror of https://github.com/immich-app/immich.git synced 2025-06-15 03:30:33 +02:00

feat: user's features preferences (#12099)

* feat: metadata in UserPreference

* feat: web metadata settings

* feat: web metadata settings

* fix: typo

* patch openapi

* fix: missing translation key

* new organization of preference strucutre

* feature settings on web

* localization

* added and used feature settings

* add default value to response dto

* patch openapi

* format en.json file

* implement helper method

* use tags preference logic

* Fix logic bug and add tests

* fix preference can be null in detail panel
This commit is contained in:
Alex
2024-08-29 14:29:04 -05:00
committed by GitHub
parent 9bfaa525db
commit ebecb60f39
32 changed files with 1418 additions and 296 deletions

View File

@ -93,23 +93,38 @@ export type EmailNotificationsResponse = {
albumUpdate: boolean;
enabled: boolean;
};
export type MemoryResponse = {
export type FoldersResponse = {
enabled: boolean;
sidebarWeb: boolean;
};
export type MemoriesResponse = {
enabled: boolean;
};
export type PeopleResponse = {
enabled: boolean;
sidebarWeb: boolean;
};
export type PurchaseResponse = {
hideBuyButtonUntil: string;
showSupportBadge: boolean;
};
export type RatingResponse = {
export type RatingsResponse = {
enabled: boolean;
};
export type TagsResponse = {
enabled: boolean;
sidebarWeb: boolean;
};
export type UserPreferencesResponseDto = {
avatar: AvatarResponse;
download: DownloadResponse;
emailNotifications: EmailNotificationsResponse;
memories: MemoryResponse;
folders: FoldersResponse;
memories: MemoriesResponse;
people: PeopleResponse;
purchase: PurchaseResponse;
rating: RatingResponse;
ratings: RatingsResponse;
tags: TagsResponse;
};
export type AvatarUpdate = {
color?: UserAvatarColor;
@ -123,23 +138,38 @@ export type EmailNotificationsUpdate = {
albumUpdate?: boolean;
enabled?: boolean;
};
export type MemoryUpdate = {
export type FoldersUpdate = {
enabled?: boolean;
sidebarWeb?: boolean;
};
export type MemoriesUpdate = {
enabled?: boolean;
};
export type PeopleUpdate = {
enabled?: boolean;
sidebarWeb?: boolean;
};
export type PurchaseUpdate = {
hideBuyButtonUntil?: string;
showSupportBadge?: boolean;
};
export type RatingUpdate = {
export type RatingsUpdate = {
enabled?: boolean;
};
export type TagsUpdate = {
enabled?: boolean;
sidebarWeb?: boolean;
};
export type UserPreferencesUpdateDto = {
avatar?: AvatarUpdate;
download?: DownloadUpdate;
emailNotifications?: EmailNotificationsUpdate;
memories?: MemoryUpdate;
folders?: FoldersUpdate;
memories?: MemoriesUpdate;
people?: PeopleUpdate;
purchase?: PurchaseUpdate;
rating?: RatingUpdate;
ratings?: RatingsUpdate;
tags?: TagsUpdate;
};
export type AlbumUserResponseDto = {
role: AlbumUserRole;