mirror of
https://github.com/immich-app/immich
synced 2026-08-15 13:03:57 +00: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:
parent
152421e288
commit
8e6bc13540
17 changed files with 276 additions and 67 deletions
|
|
@ -3824,6 +3824,29 @@
|
|||
"get": {
|
||||
"operationId": "getAllPeople",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "page",
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"description": "Page number for pagination",
|
||||
"schema": {
|
||||
"minimum": 1,
|
||||
"default": 1,
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "size",
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"description": "Number of items per page",
|
||||
"schema": {
|
||||
"minimum": 1,
|
||||
"maximum": 1000,
|
||||
"default": 500,
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "withHidden",
|
||||
"required": false,
|
||||
|
|
@ -9531,6 +9554,10 @@
|
|||
},
|
||||
"PeopleResponseDto": {
|
||||
"properties": {
|
||||
"hasNextPage": {
|
||||
"description": "This property was added in v1.110.0",
|
||||
"type": "boolean"
|
||||
},
|
||||
"hidden": {
|
||||
"type": "integer"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue