mirror of
https://github.com/immich-app/immich.git
synced 2025-12-21 17:25:35 +03:00
feat(web): shared link filters (#15948)
This commit is contained in:
@@ -38,6 +38,14 @@ class PeopleUpdate {
|
||||
sidebarWeb?: boolean;
|
||||
}
|
||||
|
||||
class SharedLinksUpdate {
|
||||
@ValidateBoolean({ optional: true })
|
||||
enabled?: boolean;
|
||||
|
||||
@ValidateBoolean({ optional: true })
|
||||
sidebarWeb?: boolean;
|
||||
}
|
||||
|
||||
class TagsUpdate {
|
||||
@ValidateBoolean({ optional: true })
|
||||
enabled?: boolean;
|
||||
@@ -98,6 +106,11 @@ export class UserPreferencesUpdateDto {
|
||||
@Type(() => RatingsUpdate)
|
||||
ratings?: RatingsUpdate;
|
||||
|
||||
@Optional()
|
||||
@ValidateNested()
|
||||
@Type(() => SharedLinksUpdate)
|
||||
sharedLinks?: SharedLinksUpdate;
|
||||
|
||||
@Optional()
|
||||
@ValidateNested()
|
||||
@Type(() => TagsUpdate)
|
||||
@@ -152,6 +165,11 @@ class TagsResponse {
|
||||
sidebarWeb: boolean = true;
|
||||
}
|
||||
|
||||
class SharedLinksResponse {
|
||||
enabled: boolean = true;
|
||||
sidebarWeb: boolean = false;
|
||||
}
|
||||
|
||||
class EmailNotificationsResponse {
|
||||
enabled!: boolean;
|
||||
albumInvite!: boolean;
|
||||
@@ -175,6 +193,7 @@ export class UserPreferencesResponseDto implements UserPreferences {
|
||||
memories!: MemoriesResponse;
|
||||
people!: PeopleResponse;
|
||||
ratings!: RatingsResponse;
|
||||
sharedLinks!: SharedLinksResponse;
|
||||
tags!: TagsResponse;
|
||||
avatar!: AvatarResponse;
|
||||
emailNotifications!: EmailNotificationsResponse;
|
||||
|
||||
@@ -34,6 +34,10 @@ export interface UserPreferences {
|
||||
ratings: {
|
||||
enabled: boolean;
|
||||
};
|
||||
sharedLinks: {
|
||||
enabled: boolean;
|
||||
sidebarWeb: boolean;
|
||||
};
|
||||
tags: {
|
||||
enabled: boolean;
|
||||
sidebarWeb: boolean;
|
||||
@@ -74,6 +78,10 @@ export const getDefaultPreferences = (user: { email: string }): UserPreferences
|
||||
enabled: true,
|
||||
sidebarWeb: false,
|
||||
},
|
||||
sharedLinks: {
|
||||
enabled: true,
|
||||
sidebarWeb: false,
|
||||
},
|
||||
ratings: {
|
||||
enabled: false,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user