mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 09:12:57 +02:00
feat(web,server): user avatar color (#4779)
This commit is contained in:
parent
14c7187539
commit
d25a245049
58 changed files with 1123 additions and 141 deletions
mobile/openapi/lib/model
19
mobile/openapi/lib/model/update_user_dto.dart
generated
19
mobile/openapi/lib/model/update_user_dto.dart
generated
|
@ -13,6 +13,7 @@ part of openapi.api;
|
|||
class UpdateUserDto {
|
||||
/// Returns a new [UpdateUserDto] instance.
|
||||
UpdateUserDto({
|
||||
this.avatarColor,
|
||||
this.email,
|
||||
this.externalPath,
|
||||
required this.id,
|
||||
|
@ -24,6 +25,14 @@ class UpdateUserDto {
|
|||
this.storageLabel,
|
||||
});
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
UserAvatarColor? avatarColor;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
|
@ -92,6 +101,7 @@ class UpdateUserDto {
|
|||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is UpdateUserDto &&
|
||||
other.avatarColor == avatarColor &&
|
||||
other.email == email &&
|
||||
other.externalPath == externalPath &&
|
||||
other.id == id &&
|
||||
|
@ -105,6 +115,7 @@ class UpdateUserDto {
|
|||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(avatarColor == null ? 0 : avatarColor!.hashCode) +
|
||||
(email == null ? 0 : email!.hashCode) +
|
||||
(externalPath == null ? 0 : externalPath!.hashCode) +
|
||||
(id.hashCode) +
|
||||
|
@ -116,10 +127,15 @@ class UpdateUserDto {
|
|||
(storageLabel == null ? 0 : storageLabel!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'UpdateUserDto[email=$email, externalPath=$externalPath, id=$id, isAdmin=$isAdmin, memoriesEnabled=$memoriesEnabled, name=$name, password=$password, shouldChangePassword=$shouldChangePassword, storageLabel=$storageLabel]';
|
||||
String toString() => 'UpdateUserDto[avatarColor=$avatarColor, email=$email, externalPath=$externalPath, id=$id, isAdmin=$isAdmin, memoriesEnabled=$memoriesEnabled, name=$name, password=$password, shouldChangePassword=$shouldChangePassword, storageLabel=$storageLabel]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (this.avatarColor != null) {
|
||||
json[r'avatarColor'] = this.avatarColor;
|
||||
} else {
|
||||
// json[r'avatarColor'] = null;
|
||||
}
|
||||
if (this.email != null) {
|
||||
json[r'email'] = this.email;
|
||||
} else {
|
||||
|
@ -172,6 +188,7 @@ class UpdateUserDto {
|
|||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return UpdateUserDto(
|
||||
avatarColor: UserAvatarColor.fromJson(json[r'avatarColor']),
|
||||
email: mapValueOfType<String>(json, r'email'),
|
||||
externalPath: mapValueOfType<String>(json, r'externalPath'),
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue