mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
feat(web): add Exif-Rating (#11580)
* Add Exif-Rating * Integrate star rating as own component * Add e2e tests for rating and validation * Rename component and async handleChangeRating * Display rating can be enabled in app settings * Correct i18n reference Co-authored-by: Michel Heusschen <59014050+michelheusschen@users.noreply.github.com> * Star rating: change from slider to buttons * Star rating for clarity * Design updates. * Renaming and code optimization * chore: clean up * chore: e2e formatting * light mode border and default value --------- Co-authored-by: Christoph Suter <christoph@suter-burri.ch> Co-authored-by: Michel Heusschen <59014050+michelheusschen@users.noreply.github.com> Co-authored-by: Mert <101130780+mertalev@users.noreply.github.com> Co-authored-by: Jason Rasmussen <jrasm91@gmail.com> Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
b1587a5dee
commit
f33dbdfe9a
37 changed files with 599 additions and 18 deletions
|
|
@ -18,6 +18,7 @@ class UserPreferencesResponseDto {
|
|||
required this.emailNotifications,
|
||||
required this.memories,
|
||||
required this.purchase,
|
||||
required this.rating,
|
||||
});
|
||||
|
||||
AvatarResponse avatar;
|
||||
|
|
@ -30,13 +31,16 @@ class UserPreferencesResponseDto {
|
|||
|
||||
PurchaseResponse purchase;
|
||||
|
||||
RatingResponse rating;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is UserPreferencesResponseDto &&
|
||||
other.avatar == avatar &&
|
||||
other.download == download &&
|
||||
other.emailNotifications == emailNotifications &&
|
||||
other.memories == memories &&
|
||||
other.purchase == purchase;
|
||||
other.purchase == purchase &&
|
||||
other.rating == rating;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
|
|
@ -45,10 +49,11 @@ class UserPreferencesResponseDto {
|
|||
(download.hashCode) +
|
||||
(emailNotifications.hashCode) +
|
||||
(memories.hashCode) +
|
||||
(purchase.hashCode);
|
||||
(purchase.hashCode) +
|
||||
(rating.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'UserPreferencesResponseDto[avatar=$avatar, download=$download, emailNotifications=$emailNotifications, memories=$memories, purchase=$purchase]';
|
||||
String toString() => 'UserPreferencesResponseDto[avatar=$avatar, download=$download, emailNotifications=$emailNotifications, memories=$memories, purchase=$purchase, rating=$rating]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
|
|
@ -57,6 +62,7 @@ class UserPreferencesResponseDto {
|
|||
json[r'emailNotifications'] = this.emailNotifications;
|
||||
json[r'memories'] = this.memories;
|
||||
json[r'purchase'] = this.purchase;
|
||||
json[r'rating'] = this.rating;
|
||||
return json;
|
||||
}
|
||||
|
||||
|
|
@ -73,6 +79,7 @@ class UserPreferencesResponseDto {
|
|||
emailNotifications: EmailNotificationsResponse.fromJson(json[r'emailNotifications'])!,
|
||||
memories: MemoryResponse.fromJson(json[r'memories'])!,
|
||||
purchase: PurchaseResponse.fromJson(json[r'purchase'])!,
|
||||
rating: RatingResponse.fromJson(json[r'rating'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
|
@ -125,6 +132,7 @@ class UserPreferencesResponseDto {
|
|||
'emailNotifications',
|
||||
'memories',
|
||||
'purchase',
|
||||
'rating',
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue