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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 742 additions and 108 deletions

View file

@ -17,7 +17,10 @@ class PersonApi {
final ApiClient apiClient;
/// Performs an HTTP 'GET /person' operation and returns the [Response].
Future<Response> getAllPeopleWithHttpInfo() async {
/// Parameters:
///
/// * [bool] withHidden:
Future<Response> getAllPeopleWithHttpInfo({ bool? withHidden, }) async {
// ignore: prefer_const_declarations
final path = r'/person';
@ -28,6 +31,10 @@ class PersonApi {
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (withHidden != null) {
queryParams.addAll(_queryParams('', 'withHidden', withHidden));
}
const contentTypes = <String>[];
@ -42,8 +49,11 @@ class PersonApi {
);
}
Future<List<PersonResponseDto>?> getAllPeople() async {
final response = await getAllPeopleWithHttpInfo();
/// Parameters:
///
/// * [bool] withHidden:
Future<PeopleResponseDto?> getAllPeople({ bool? withHidden, }) async {
final response = await getAllPeopleWithHttpInfo( withHidden: withHidden, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
@ -51,11 +61,8 @@ class PersonApi {
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<PersonResponseDto>') as List)
.cast<PersonResponseDto>()
.toList();
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PeopleResponseDto',) as PeopleResponseDto;
}
return null;
}