mirror of
https://github.com/immich-app/immich.git
synced 2025-12-18 01:11:07 +03: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:
@@ -9164,6 +9164,34 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"FoldersResponse": {
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"default": false,
|
||||
"type": "boolean"
|
||||
},
|
||||
"sidebarWeb": {
|
||||
"default": false,
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"enabled",
|
||||
"sidebarWeb"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"FoldersUpdate": {
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"sidebarWeb": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"ImageFormat": {
|
||||
"enum": [
|
||||
"jpeg",
|
||||
@@ -9534,6 +9562,26 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"MemoriesResponse": {
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"default": true,
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"enabled"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"MemoriesUpdate": {
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"MemoryCreateDto": {
|
||||
"properties": {
|
||||
"assetIds": {
|
||||
@@ -9586,17 +9634,6 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"MemoryResponse": {
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"enabled"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"MemoryResponseDto": {
|
||||
"properties": {
|
||||
"assets": {
|
||||
@@ -9660,14 +9697,6 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"MemoryUpdate": {
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"MemoryUpdateDto": {
|
||||
"properties": {
|
||||
"isSaved": {
|
||||
@@ -9953,6 +9982,23 @@
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"PeopleResponse": {
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"default": true,
|
||||
"type": "boolean"
|
||||
},
|
||||
"sidebarWeb": {
|
||||
"default": false,
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"enabled",
|
||||
"sidebarWeb"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"PeopleResponseDto": {
|
||||
"properties": {
|
||||
"hasNextPage": {
|
||||
@@ -9979,6 +10025,17 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"PeopleUpdate": {
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"sidebarWeb": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"PeopleUpdateDto": {
|
||||
"properties": {
|
||||
"people": {
|
||||
@@ -10300,7 +10357,7 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"RatingResponse": {
|
||||
"RatingsResponse": {
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"default": false,
|
||||
@@ -10312,7 +10369,7 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"RatingUpdate": {
|
||||
"RatingsUpdate": {
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
@@ -12002,6 +12059,34 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"TagsResponse": {
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"default": true,
|
||||
"type": "boolean"
|
||||
},
|
||||
"sidebarWeb": {
|
||||
"default": true,
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"enabled",
|
||||
"sidebarWeb"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"TagsUpdate": {
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"sidebarWeb": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"TimeBucketResponseDto": {
|
||||
"properties": {
|
||||
"count": {
|
||||
@@ -12379,23 +12464,35 @@
|
||||
"emailNotifications": {
|
||||
"$ref": "#/components/schemas/EmailNotificationsResponse"
|
||||
},
|
||||
"folders": {
|
||||
"$ref": "#/components/schemas/FoldersResponse"
|
||||
},
|
||||
"memories": {
|
||||
"$ref": "#/components/schemas/MemoryResponse"
|
||||
"$ref": "#/components/schemas/MemoriesResponse"
|
||||
},
|
||||
"people": {
|
||||
"$ref": "#/components/schemas/PeopleResponse"
|
||||
},
|
||||
"purchase": {
|
||||
"$ref": "#/components/schemas/PurchaseResponse"
|
||||
},
|
||||
"rating": {
|
||||
"$ref": "#/components/schemas/RatingResponse"
|
||||
"ratings": {
|
||||
"$ref": "#/components/schemas/RatingsResponse"
|
||||
},
|
||||
"tags": {
|
||||
"$ref": "#/components/schemas/TagsResponse"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"avatar",
|
||||
"download",
|
||||
"emailNotifications",
|
||||
"folders",
|
||||
"memories",
|
||||
"people",
|
||||
"purchase",
|
||||
"rating"
|
||||
"ratings",
|
||||
"tags"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
@@ -12410,14 +12507,23 @@
|
||||
"emailNotifications": {
|
||||
"$ref": "#/components/schemas/EmailNotificationsUpdate"
|
||||
},
|
||||
"folders": {
|
||||
"$ref": "#/components/schemas/FoldersUpdate"
|
||||
},
|
||||
"memories": {
|
||||
"$ref": "#/components/schemas/MemoryUpdate"
|
||||
"$ref": "#/components/schemas/MemoriesUpdate"
|
||||
},
|
||||
"people": {
|
||||
"$ref": "#/components/schemas/PeopleUpdate"
|
||||
},
|
||||
"purchase": {
|
||||
"$ref": "#/components/schemas/PurchaseUpdate"
|
||||
},
|
||||
"rating": {
|
||||
"$ref": "#/components/schemas/RatingUpdate"
|
||||
"ratings": {
|
||||
"$ref": "#/components/schemas/RatingsUpdate"
|
||||
},
|
||||
"tags": {
|
||||
"$ref": "#/components/schemas/TagsUpdate"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user