mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(web): show partners assets on the main timeline (#4933)
This commit is contained in:
parent
3b11854702
commit
35767591d2
59 changed files with 1929 additions and 172 deletions
|
|
@ -18,11 +18,12 @@ class User {
|
|||
this.isPartnerSharedWith = false,
|
||||
this.profileImagePath = '',
|
||||
this.memoryEnabled = true,
|
||||
this.inTimeline = false,
|
||||
});
|
||||
|
||||
Id get isarId => fastHash(id);
|
||||
|
||||
User.fromDto(UserResponseDto dto)
|
||||
User.fromUserDto(UserResponseDto dto)
|
||||
: id = dto.id,
|
||||
updatedAt = dto.updatedAt,
|
||||
email = dto.email,
|
||||
|
|
@ -34,6 +35,19 @@ class User {
|
|||
isAdmin = dto.isAdmin,
|
||||
memoryEnabled = dto.memoriesEnabled;
|
||||
|
||||
User.fromPartnerDto(PartnerResponseDto dto)
|
||||
: id = dto.id,
|
||||
updatedAt = dto.updatedAt,
|
||||
email = dto.email,
|
||||
firstName = dto.firstName,
|
||||
lastName = dto.lastName,
|
||||
isPartnerSharedBy = false,
|
||||
isPartnerSharedWith = false,
|
||||
profileImagePath = dto.profileImagePath,
|
||||
isAdmin = dto.isAdmin,
|
||||
memoryEnabled = dto.memoriesEnabled,
|
||||
inTimeline = dto.inTimeline;
|
||||
|
||||
@Index(unique: true, replace: false, type: IndexType.hash)
|
||||
String id;
|
||||
DateTime updatedAt;
|
||||
|
|
@ -45,6 +59,8 @@ class User {
|
|||
bool isAdmin;
|
||||
String profileImagePath;
|
||||
bool? memoryEnabled;
|
||||
bool? inTimeline;
|
||||
|
||||
@Backlink(to: 'owner')
|
||||
final IsarLinks<Album> albums = IsarLinks<Album>();
|
||||
@Backlink(to: 'sharedUsers')
|
||||
|
|
@ -62,7 +78,8 @@ class User {
|
|||
isPartnerSharedWith == other.isPartnerSharedWith &&
|
||||
profileImagePath == other.profileImagePath &&
|
||||
isAdmin == other.isAdmin &&
|
||||
memoryEnabled == other.memoryEnabled;
|
||||
memoryEnabled == other.memoryEnabled &&
|
||||
inTimeline == other.inTimeline;
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
@ -77,5 +94,6 @@ class User {
|
|||
isPartnerSharedWith.hashCode ^
|
||||
profileImagePath.hashCode ^
|
||||
isAdmin.hashCode ^
|
||||
memoryEnabled.hashCode;
|
||||
memoryEnabled.hashCode ^
|
||||
inTimeline.hashCode;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue