mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(web,server): user memory settings (#3628)
* feat(web,server): user preference for time-based memories * chore: open api * dev: mobile * fix: update * mobile work --------- Co-authored-by: Alex <alex.tran1502@gmail.com> Co-authored-by: Alex Tran <Alex.Tran@conductix.com>
This commit is contained in:
parent
343087e2b4
commit
a6eb227330
33 changed files with 519 additions and 25 deletions
19
mobile/openapi/lib/model/create_user_dto.dart
generated
19
mobile/openapi/lib/model/create_user_dto.dart
generated
|
|
@ -17,6 +17,7 @@ class CreateUserDto {
|
|||
this.externalPath,
|
||||
required this.firstName,
|
||||
required this.lastName,
|
||||
this.memoriesEnabled,
|
||||
required this.password,
|
||||
this.storageLabel,
|
||||
});
|
||||
|
|
@ -29,6 +30,14 @@ class CreateUserDto {
|
|||
|
||||
String lastName;
|
||||
|
||||
///
|
||||
/// 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.
|
||||
///
|
||||
bool? memoriesEnabled;
|
||||
|
||||
String password;
|
||||
|
||||
String? storageLabel;
|
||||
|
|
@ -39,6 +48,7 @@ class CreateUserDto {
|
|||
other.externalPath == externalPath &&
|
||||
other.firstName == firstName &&
|
||||
other.lastName == lastName &&
|
||||
other.memoriesEnabled == memoriesEnabled &&
|
||||
other.password == password &&
|
||||
other.storageLabel == storageLabel;
|
||||
|
||||
|
|
@ -49,11 +59,12 @@ class CreateUserDto {
|
|||
(externalPath == null ? 0 : externalPath!.hashCode) +
|
||||
(firstName.hashCode) +
|
||||
(lastName.hashCode) +
|
||||
(memoriesEnabled == null ? 0 : memoriesEnabled!.hashCode) +
|
||||
(password.hashCode) +
|
||||
(storageLabel == null ? 0 : storageLabel!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'CreateUserDto[email=$email, externalPath=$externalPath, firstName=$firstName, lastName=$lastName, password=$password, storageLabel=$storageLabel]';
|
||||
String toString() => 'CreateUserDto[email=$email, externalPath=$externalPath, firstName=$firstName, lastName=$lastName, memoriesEnabled=$memoriesEnabled, password=$password, storageLabel=$storageLabel]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
|
|
@ -65,6 +76,11 @@ class CreateUserDto {
|
|||
}
|
||||
json[r'firstName'] = this.firstName;
|
||||
json[r'lastName'] = this.lastName;
|
||||
if (this.memoriesEnabled != null) {
|
||||
json[r'memoriesEnabled'] = this.memoriesEnabled;
|
||||
} else {
|
||||
// json[r'memoriesEnabled'] = null;
|
||||
}
|
||||
json[r'password'] = this.password;
|
||||
if (this.storageLabel != null) {
|
||||
json[r'storageLabel'] = this.storageLabel;
|
||||
|
|
@ -86,6 +102,7 @@ class CreateUserDto {
|
|||
externalPath: mapValueOfType<String>(json, r'externalPath'),
|
||||
firstName: mapValueOfType<String>(json, r'firstName')!,
|
||||
lastName: mapValueOfType<String>(json, r'lastName')!,
|
||||
memoriesEnabled: mapValueOfType<bool>(json, r'memoriesEnabled'),
|
||||
password: mapValueOfType<String>(json, r'password')!,
|
||||
storageLabel: mapValueOfType<String>(json, r'storageLabel'),
|
||||
);
|
||||
|
|
|
|||
19
mobile/openapi/lib/model/update_user_dto.dart
generated
19
mobile/openapi/lib/model/update_user_dto.dart
generated
|
|
@ -19,6 +19,7 @@ class UpdateUserDto {
|
|||
required this.id,
|
||||
this.isAdmin,
|
||||
this.lastName,
|
||||
this.memoriesEnabled,
|
||||
this.password,
|
||||
this.shouldChangePassword,
|
||||
this.storageLabel,
|
||||
|
|
@ -66,6 +67,14 @@ class UpdateUserDto {
|
|||
///
|
||||
String? lastName;
|
||||
|
||||
///
|
||||
/// 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.
|
||||
///
|
||||
bool? memoriesEnabled;
|
||||
|
||||
///
|
||||
/// 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
|
||||
|
|
@ -98,6 +107,7 @@ class UpdateUserDto {
|
|||
other.id == id &&
|
||||
other.isAdmin == isAdmin &&
|
||||
other.lastName == lastName &&
|
||||
other.memoriesEnabled == memoriesEnabled &&
|
||||
other.password == password &&
|
||||
other.shouldChangePassword == shouldChangePassword &&
|
||||
other.storageLabel == storageLabel;
|
||||
|
|
@ -111,12 +121,13 @@ class UpdateUserDto {
|
|||
(id.hashCode) +
|
||||
(isAdmin == null ? 0 : isAdmin!.hashCode) +
|
||||
(lastName == null ? 0 : lastName!.hashCode) +
|
||||
(memoriesEnabled == null ? 0 : memoriesEnabled!.hashCode) +
|
||||
(password == null ? 0 : password!.hashCode) +
|
||||
(shouldChangePassword == null ? 0 : shouldChangePassword!.hashCode) +
|
||||
(storageLabel == null ? 0 : storageLabel!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'UpdateUserDto[email=$email, externalPath=$externalPath, firstName=$firstName, id=$id, isAdmin=$isAdmin, lastName=$lastName, password=$password, shouldChangePassword=$shouldChangePassword, storageLabel=$storageLabel]';
|
||||
String toString() => 'UpdateUserDto[email=$email, externalPath=$externalPath, firstName=$firstName, id=$id, isAdmin=$isAdmin, lastName=$lastName, memoriesEnabled=$memoriesEnabled, password=$password, shouldChangePassword=$shouldChangePassword, storageLabel=$storageLabel]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
|
|
@ -146,6 +157,11 @@ class UpdateUserDto {
|
|||
} else {
|
||||
// json[r'lastName'] = null;
|
||||
}
|
||||
if (this.memoriesEnabled != null) {
|
||||
json[r'memoriesEnabled'] = this.memoriesEnabled;
|
||||
} else {
|
||||
// json[r'memoriesEnabled'] = null;
|
||||
}
|
||||
if (this.password != null) {
|
||||
json[r'password'] = this.password;
|
||||
} else {
|
||||
|
|
@ -178,6 +194,7 @@ class UpdateUserDto {
|
|||
id: mapValueOfType<String>(json, r'id')!,
|
||||
isAdmin: mapValueOfType<bool>(json, r'isAdmin'),
|
||||
lastName: mapValueOfType<String>(json, r'lastName'),
|
||||
memoriesEnabled: mapValueOfType<bool>(json, r'memoriesEnabled'),
|
||||
password: mapValueOfType<String>(json, r'password'),
|
||||
shouldChangePassword: mapValueOfType<bool>(json, r'shouldChangePassword'),
|
||||
storageLabel: mapValueOfType<String>(json, r'storageLabel'),
|
||||
|
|
|
|||
10
mobile/openapi/lib/model/user_response_dto.dart
generated
10
mobile/openapi/lib/model/user_response_dto.dart
generated
|
|
@ -21,6 +21,7 @@ class UserResponseDto {
|
|||
required this.id,
|
||||
required this.isAdmin,
|
||||
required this.lastName,
|
||||
required this.memoriesEnabled,
|
||||
required this.oauthId,
|
||||
required this.profileImagePath,
|
||||
required this.shouldChangePassword,
|
||||
|
|
@ -44,6 +45,8 @@ class UserResponseDto {
|
|||
|
||||
String lastName;
|
||||
|
||||
bool memoriesEnabled;
|
||||
|
||||
String oauthId;
|
||||
|
||||
String profileImagePath;
|
||||
|
|
@ -64,6 +67,7 @@ class UserResponseDto {
|
|||
other.id == id &&
|
||||
other.isAdmin == isAdmin &&
|
||||
other.lastName == lastName &&
|
||||
other.memoriesEnabled == memoriesEnabled &&
|
||||
other.oauthId == oauthId &&
|
||||
other.profileImagePath == profileImagePath &&
|
||||
other.shouldChangePassword == shouldChangePassword &&
|
||||
|
|
@ -81,6 +85,7 @@ class UserResponseDto {
|
|||
(id.hashCode) +
|
||||
(isAdmin.hashCode) +
|
||||
(lastName.hashCode) +
|
||||
(memoriesEnabled.hashCode) +
|
||||
(oauthId.hashCode) +
|
||||
(profileImagePath.hashCode) +
|
||||
(shouldChangePassword.hashCode) +
|
||||
|
|
@ -88,7 +93,7 @@ class UserResponseDto {
|
|||
(updatedAt.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'UserResponseDto[createdAt=$createdAt, deletedAt=$deletedAt, email=$email, externalPath=$externalPath, firstName=$firstName, id=$id, isAdmin=$isAdmin, lastName=$lastName, oauthId=$oauthId, profileImagePath=$profileImagePath, shouldChangePassword=$shouldChangePassword, storageLabel=$storageLabel, updatedAt=$updatedAt]';
|
||||
String toString() => 'UserResponseDto[createdAt=$createdAt, deletedAt=$deletedAt, email=$email, externalPath=$externalPath, firstName=$firstName, id=$id, isAdmin=$isAdmin, lastName=$lastName, memoriesEnabled=$memoriesEnabled, oauthId=$oauthId, profileImagePath=$profileImagePath, shouldChangePassword=$shouldChangePassword, storageLabel=$storageLabel, updatedAt=$updatedAt]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
|
|
@ -108,6 +113,7 @@ class UserResponseDto {
|
|||
json[r'id'] = this.id;
|
||||
json[r'isAdmin'] = this.isAdmin;
|
||||
json[r'lastName'] = this.lastName;
|
||||
json[r'memoriesEnabled'] = this.memoriesEnabled;
|
||||
json[r'oauthId'] = this.oauthId;
|
||||
json[r'profileImagePath'] = this.profileImagePath;
|
||||
json[r'shouldChangePassword'] = this.shouldChangePassword;
|
||||
|
|
@ -136,6 +142,7 @@ class UserResponseDto {
|
|||
id: mapValueOfType<String>(json, r'id')!,
|
||||
isAdmin: mapValueOfType<bool>(json, r'isAdmin')!,
|
||||
lastName: mapValueOfType<String>(json, r'lastName')!,
|
||||
memoriesEnabled: mapValueOfType<bool>(json, r'memoriesEnabled')!,
|
||||
oauthId: mapValueOfType<String>(json, r'oauthId')!,
|
||||
profileImagePath: mapValueOfType<String>(json, r'profileImagePath')!,
|
||||
shouldChangePassword: mapValueOfType<bool>(json, r'shouldChangePassword')!,
|
||||
|
|
@ -196,6 +203,7 @@ class UserResponseDto {
|
|||
'id',
|
||||
'isAdmin',
|
||||
'lastName',
|
||||
'memoriesEnabled',
|
||||
'oauthId',
|
||||
'profileImagePath',
|
||||
'shouldChangePassword',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue