Keep links from plugins in sources after loading more

In the source view, links from plugins had been removed, when more files
had been fetched using the 'proceed' link for more than 100 files. This
caused the issue, that buttons from plugins (like "upload file" from the
editor plugin) did no longer show up after loading more files.

Now, we keep all links from the first page except the proceed link.

Pushed-by: Rene Pfeuffer<rene.pfeuffer@cloudogu.com>
Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
Committed-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
This commit is contained in:
Rene Pfeuffer
2024-02-12 14:14:34 +01:00
parent 89c4a20dd5
commit ec14d4cbd5
2 changed files with 7 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
- type: fixed
description: Buttons from plugins in the code view will not be removed after fetching more sources

View File

@@ -113,12 +113,17 @@ const merge = (files?: File[]): File | undefined => {
children.push(...(page._embedded?.children || []));
}
const lastPage = files[files.length - 1];
const firstPage = files[0];
return {
...lastPage,
_embedded: {
...lastPage._embedded,
children,
},
_links: {
...firstPage._links,
proceed: lastPage._links.proceed,
}
};
};