mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
118 - Implement shared album feature (#124)
* New features - Share album. Users can now create albums to share with existing people on the network. - Owner can delete the album. - Owner can invite the additional users to the album. - Shared users and the owner can add additional assets to the album. * In the asset viewer, the user can swipe up to see detailed information and swip down to dismiss. * Several UI enhancements.
This commit is contained in:
parent
a3b84b3ca7
commit
4309104925
87 changed files with 3717 additions and 199 deletions
60
mobile/lib/shared/models/user_info.model.dart
Normal file
60
mobile/lib/shared/models/user_info.model.dart
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
import 'dart:convert';
|
||||
|
||||
class UserInfo {
|
||||
final String id;
|
||||
final String email;
|
||||
final String createdAt;
|
||||
|
||||
UserInfo({
|
||||
required this.id,
|
||||
required this.email,
|
||||
required this.createdAt,
|
||||
});
|
||||
|
||||
UserInfo copyWith({
|
||||
String? id,
|
||||
String? email,
|
||||
String? createdAt,
|
||||
}) {
|
||||
return UserInfo(
|
||||
id: id ?? this.id,
|
||||
email: email ?? this.email,
|
||||
createdAt: createdAt ?? this.createdAt,
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
final result = <String, dynamic>{};
|
||||
|
||||
result.addAll({'id': id});
|
||||
result.addAll({'email': email});
|
||||
result.addAll({'createdAt': createdAt});
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
factory UserInfo.fromMap(Map<String, dynamic> map) {
|
||||
return UserInfo(
|
||||
id: map['id'] ?? '',
|
||||
email: map['email'] ?? '',
|
||||
createdAt: map['createdAt'] ?? '',
|
||||
);
|
||||
}
|
||||
|
||||
String toJson() => json.encode(toMap());
|
||||
|
||||
factory UserInfo.fromJson(String source) => UserInfo.fromMap(json.decode(source));
|
||||
|
||||
@override
|
||||
String toString() => 'UserInfo(id: $id, email: $email, createdAt: $createdAt)';
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if (identical(this, other)) return true;
|
||||
|
||||
return other is UserInfo && other.id == id && other.email == email && other.createdAt == createdAt;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => id.hashCode ^ email.hashCode ^ createdAt.hashCode;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue