0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-04-04 14:36:16 +02:00

display all repos as flat list if on homepage

This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2025-11-22 20:04:39 -05:00
parent eeba95f6e0
commit bd731f0ad6
No known key found for this signature in database
GPG Key ID: 924A5F6AF051E87C

View File

@ -394,7 +394,7 @@ export default defineComponent({
return;
}
if (searchedURL.startsWith(this.searchURL)) {
if (searchedURL.startsWith(searchedURL)) {
this.repos = json.data.repos.map((webSearchRepo: any) => {
return {
...webSearchRepo.repository,
@ -403,8 +403,12 @@ export default defineComponent({
locale_latest_commit_status_state: webSearchRepo.locale_latest_commit_status,
};
});
let realRepos: any[] = this.repos;
if(window.location.pathname !== "/") {
realRepos = this.repos.filter((a: any) => !a.group_id)
}
this.groups.set(0, {
repos: this.repos.filter((a: any) => !a.group_id),
repos: realRepos,
subgroups: json.data.subgroups.map((g: any) => {
return g.group.id;
}),