mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-16 02:06:18 +01:00
Filer repositories in UI by namespace
This commit is contained in:
@@ -67,11 +67,13 @@ export function fetchRepos(link: string) {
|
||||
return fetchReposByLink(link);
|
||||
}
|
||||
|
||||
export function fetchReposByPage(link: string, page: number, filter?: string) {
|
||||
export function fetchReposByPage(link: string, page: number, namespace?: string, filter?: string) {
|
||||
const namespacePath = namespace ? `${namespace}/` : "";
|
||||
const linkWithPage = `${link}${namespacePath}?page=${page - 1}`;
|
||||
if (filter) {
|
||||
return fetchReposByLink(`${link}?page=${page - 1}&q=${decodeURIComponent(filter)}`);
|
||||
return fetchReposByLink(`${linkWithPage}}&q=${decodeURIComponent(filter)}`);
|
||||
}
|
||||
return fetchReposByLink(`${link}?page=${page - 1}`);
|
||||
return fetchReposByLink(linkWithPage);
|
||||
}
|
||||
|
||||
function appendSortByLink(url: string) {
|
||||
|
||||
Reference in New Issue
Block a user