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

feat(web,server): search people (#5703)

* feat: search peoples

* fix: responsive design

* use existing count

* generate sql file

* fix: tests

* remove visible people

* fix: merge, hide...

* use component

* fix: linter

* chore: regenerate api

* fix: change name when searching for a face

* save search

* remove duplicate

* use enums for query parameters

* fix: increase to 20 for the local search

* use constants

* simplify

* fix: number of people more visible

* fix: merge

* fix: search

* fix: loading spinner position

* pr feedback
This commit is contained in:
martin
2024-01-28 01:54:31 +01:00
committed by GitHub
parent 2249f7d42a
commit fa0913120d
37 changed files with 286 additions and 148 deletions

View File

@@ -10,7 +10,6 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**people** | [**List<PersonResponseDto>**](PersonResponseDto.md) | | [default to const []]
**total** | **int** | |
**visible** | **int** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -15,36 +15,30 @@ class PeopleResponseDto {
PeopleResponseDto({
this.people = const [],
required this.total,
required this.visible,
});
List<PersonResponseDto> people;
int total;
int visible;
@override
bool operator ==(Object other) => identical(this, other) || other is PeopleResponseDto &&
_deepEquality.equals(other.people, people) &&
other.total == total &&
other.visible == visible;
other.total == total;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(people.hashCode) +
(total.hashCode) +
(visible.hashCode);
(total.hashCode);
@override
String toString() => 'PeopleResponseDto[people=$people, total=$total, visible=$visible]';
String toString() => 'PeopleResponseDto[people=$people, total=$total]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'people'] = this.people;
json[r'total'] = this.total;
json[r'visible'] = this.visible;
return json;
}
@@ -58,7 +52,6 @@ class PeopleResponseDto {
return PeopleResponseDto(
people: PersonResponseDto.listFromJson(json[r'people']),
total: mapValueOfType<int>(json, r'total')!,
visible: mapValueOfType<int>(json, r'visible')!,
);
}
return null;
@@ -108,7 +101,6 @@ class PeopleResponseDto {
static const requiredKeys = <String>{
'people',
'total',
'visible',
};
}

View File

@@ -26,11 +26,6 @@ void main() {
// TODO
});
// int visible
test('to test the property `visible`', () async {
// TODO
});
});