Fix repo listing not displaying all repos

`Show::All` which is the default value should return all values obtained
from `storage.repositories()`.
This commit adds a `Show::Contributor` enum variant to only get repos
that the user has forked, initialized or contributed in some way.
This commit is contained in:
Sebastian Martinez
2025-01-27 13:19:42 +01:00
parent 9235f1867c
commit 19fdd17f99
5 changed files with 27 additions and 3 deletions
+16
View File
@@ -151,6 +151,22 @@
</div>
<!-- svelte-ignore a11y_click_events_have_key_events -->
<!-- svelte-ignore a11y_no_static_element_interactions -->
<div
class="tab"
class:active={activeTab.filter === "contributor"}
onclick={() =>
router.push({
resource: "home",
activeTab: "contributor",
})}>
<div class="global-flex">
<Icon name="user" />
<div>Contributor</div>
</div>
<div class="global-counter">{repoCount.contributor}</div>
</div>
<!-- svelte-ignore a11y_click_events_have_key_events -->
<!-- svelte-ignore a11y_no_static_element_interactions -->
<div
class="tab"
class:active={activeTab.filter === "private"}
+3 -1
View File
@@ -17,7 +17,7 @@ import {
loadPatches,
} from "@app/views/repo/router";
export type HomeReposTab = "delegate" | "private";
export type HomeReposTab = "delegate" | "private" | "contributor";
export interface HomeInboxTab {
rid: string;
@@ -106,6 +106,8 @@ export async function loadRoute(
if (route.resource === "home") {
if (route.activeTab === "delegate") {
show = "delegate";
} else if (route.activeTab === "contributor") {
show = "contributor";
} else if (route.activeTab === "private") {
show = "private";
}