mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 07:25:44 +01:00
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:
2
gradle/changelog/code_buttons.yaml
Normal file
2
gradle/changelog/code_buttons.yaml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
- type: fixed
|
||||||
|
description: Buttons from plugins in the code view will not be removed after fetching more sources
|
||||||
@@ -113,12 +113,17 @@ const merge = (files?: File[]): File | undefined => {
|
|||||||
children.push(...(page._embedded?.children || []));
|
children.push(...(page._embedded?.children || []));
|
||||||
}
|
}
|
||||||
const lastPage = files[files.length - 1];
|
const lastPage = files[files.length - 1];
|
||||||
|
const firstPage = files[0];
|
||||||
return {
|
return {
|
||||||
...lastPage,
|
...lastPage,
|
||||||
_embedded: {
|
_embedded: {
|
||||||
...lastPage._embedded,
|
...lastPage._embedded,
|
||||||
children,
|
children,
|
||||||
},
|
},
|
||||||
|
_links: {
|
||||||
|
...firstPage._links,
|
||||||
|
proceed: lastPage._links.proceed,
|
||||||
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user