1
0
mirror of https://github.com/immich-app/immich.git synced 2025-06-16 03:40:33 +02:00

feat: people infinite scroll (#11326)

* feat: people infinite scroll

* add infinite scroll to show & hide modal

* update unit tests

* show total people count instead of currently loaded

* update personsearchdto
This commit is contained in:
Michel Heusschen
2024-07-25 21:59:28 +02:00
committed by GitHub
parent 152421e288
commit 8e6bc13540
17 changed files with 276 additions and 67 deletions

View File

@ -607,6 +607,8 @@ export type UpdatePartnerDto = {
inTimeline: boolean;
};
export type PeopleResponseDto = {
/** This property was added in v1.110.0 */
hasNextPage?: boolean;
hidden: number;
people: PersonResponseDto[];
total: number;
@ -2173,13 +2175,17 @@ export function updatePartner({ id, updatePartnerDto }: {
body: updatePartnerDto
})));
}
export function getAllPeople({ withHidden }: {
export function getAllPeople({ page, size, withHidden }: {
page?: number;
size?: number;
withHidden?: boolean;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchJson<{
status: 200;
data: PeopleResponseDto;
}>(`/people${QS.query(QS.explode({
page,
size,
withHidden
}))}`, {
...opts