1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-08 23:07:06 +02:00

feat(server,web): hide faces (#3262)

* feat: hide faces

* fix: types

* pr feedback

* fix: svelte checks

* feat: new server endpoint

* refactor: rename person count dto

* fix(server): linter

* fix: remove duplicate button

* docs: add comments

* pr feedback

* fix: get unhidden faces

* fix: do not use PersonCountResponseDto

* fix: transition

* pr feedback

* pr feedback

* fix: remove unused check

* add server tests

* rename persons to people

* feat: add exit button

* pr feedback

* add server tests

* pr feedback

* pr feedback

* fix: show & hide faces

* simplify

* fix: close button

* pr feeback

* pr feeback

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
martin
2023-07-18 20:09:43 +02:00
committed by GitHub
parent 02b70e693c
commit f28fc8fa5c
38 changed files with 742 additions and 108 deletions

View File

@ -16,6 +16,7 @@ class PersonResponseDto {
required this.id,
required this.name,
required this.thumbnailPath,
required this.isHidden,
});
String id;
@ -24,27 +25,32 @@ class PersonResponseDto {
String thumbnailPath;
bool isHidden;
@override
bool operator ==(Object other) => identical(this, other) || other is PersonResponseDto &&
other.id == id &&
other.name == name &&
other.thumbnailPath == thumbnailPath;
other.thumbnailPath == thumbnailPath &&
other.isHidden == isHidden;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id.hashCode) +
(name.hashCode) +
(thumbnailPath.hashCode);
(thumbnailPath.hashCode) +
(isHidden.hashCode);
@override
String toString() => 'PersonResponseDto[id=$id, name=$name, thumbnailPath=$thumbnailPath]';
String toString() => 'PersonResponseDto[id=$id, name=$name, thumbnailPath=$thumbnailPath, isHidden=$isHidden]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'id'] = this.id;
json[r'name'] = this.name;
json[r'thumbnailPath'] = this.thumbnailPath;
json[r'isHidden'] = this.isHidden;
return json;
}
@ -59,6 +65,7 @@ class PersonResponseDto {
id: mapValueOfType<String>(json, r'id')!,
name: mapValueOfType<String>(json, r'name')!,
thumbnailPath: mapValueOfType<String>(json, r'thumbnailPath')!,
isHidden: mapValueOfType<bool>(json, r'isHidden')!,
);
}
return null;
@ -109,6 +116,7 @@ class PersonResponseDto {
'id',
'name',
'thumbnailPath',
'isHidden',
};
}