mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
chore(web): change license wording and other things (#11309)
This commit is contained in:
parent
bc20710c6d
commit
ef7a6bb246
40 changed files with 1045 additions and 518 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { Type } from 'class-transformer';
|
||||
import { IsEnum, IsInt, IsPositive, ValidateNested } from 'class-validator';
|
||||
import { IsDateString, IsEnum, IsInt, IsPositive, ValidateNested } from 'class-validator';
|
||||
import { UserAvatarColor, UserPreferences } from 'src/entities/user-metadata.entity';
|
||||
import { Optional, ValidateBoolean } from 'src/validation';
|
||||
|
||||
|
|
@ -35,6 +35,15 @@ class DownloadUpdate {
|
|||
archiveSize?: number;
|
||||
}
|
||||
|
||||
class PurchaseUpdate {
|
||||
@ValidateBoolean({ optional: true })
|
||||
showSupportBadge?: boolean;
|
||||
|
||||
@IsDateString()
|
||||
@Optional()
|
||||
hideBuyButtonUntil?: string;
|
||||
}
|
||||
|
||||
export class UserPreferencesUpdateDto {
|
||||
@Optional()
|
||||
@ValidateNested()
|
||||
|
|
@ -55,6 +64,11 @@ export class UserPreferencesUpdateDto {
|
|||
@ValidateNested()
|
||||
@Type(() => DownloadUpdate)
|
||||
download?: DownloadUpdate;
|
||||
|
||||
@Optional()
|
||||
@ValidateNested()
|
||||
@Type(() => PurchaseUpdate)
|
||||
purchase?: PurchaseUpdate;
|
||||
}
|
||||
|
||||
class AvatarResponse {
|
||||
|
|
@ -77,11 +91,17 @@ class DownloadResponse {
|
|||
archiveSize!: number;
|
||||
}
|
||||
|
||||
class PurchaseResponse {
|
||||
showSupportBadge!: boolean;
|
||||
hideBuyButtonUntil!: string;
|
||||
}
|
||||
|
||||
export class UserPreferencesResponseDto implements UserPreferences {
|
||||
memories!: MemoryResponse;
|
||||
avatar!: AvatarResponse;
|
||||
emailNotifications!: EmailNotificationsResponse;
|
||||
download!: DownloadResponse;
|
||||
purchase!: PurchaseResponse;
|
||||
}
|
||||
|
||||
export const mapPreferences = (preferences: UserPreferences): UserPreferencesResponseDto => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue