From 97dac7e28f62cfd29e2a79d2f8a3175cc4562369 Mon Sep 17 00:00:00 2001 From: Cameron Eldridge Date: Wed, 20 Aug 2025 16:01:24 -0400 Subject: [PATCH] Add rudimentary "Browse all repos on node" view Seemed to me there was no way to browse all the repositories being seeded on a node. On the massive public nodes this is not that useful a feature since there are too many and too jumbled an assortment, but for a smaller personal node, this feature might be valuable to make the explorer's contents a bit easier to explore. Went with the most unintrusive implementation of this idea for now; just enough that it "does the job" (you can access this view, and paginate the results) but does not have any of the bells and whistles it should have (search/filtering, sorting, page query parameters support). As part of this work, since the repos section gets much more complex, I extracted the repos part of the page into its own component. Otherwise, it is just very simply allowing the parameters to the `fetchRepoInfos` call to be manipulated from the page. --- src/views/nodes/ReposView.svelte | 168 +++++++++++++++++++++++++++++++ src/views/nodes/View.svelte | 67 +----------- 2 files changed, 170 insertions(+), 65 deletions(-) create mode 100644 src/views/nodes/ReposView.svelte diff --git a/src/views/nodes/ReposView.svelte b/src/views/nodes/ReposView.svelte new file mode 100644 index 000000000..90e3e28c0 --- /dev/null +++ b/src/views/nodes/ReposView.svelte @@ -0,0 +1,168 @@ + + + + +
+ {#await fetchRepoInfos(baseUrl, { show: listState, perPage, page })} +
+ +
+ {:then repoInfos} + {#if repoInfos.length > 0} +
+ {#each repoInfos as repoInfo} + + {/each} +
+ + {:else} +
+ {#if listState === "pinned"} + + {:else} + + {/if} +
+ {/if} + {:catch error} + {router.push(handleError(error, baseUrlToString(baseUrl)))} + {/await} +
diff --git a/src/views/nodes/View.svelte b/src/views/nodes/View.svelte index b145ebda1..1b742f41b 100644 --- a/src/views/nodes/View.svelte +++ b/src/views/nodes/View.svelte @@ -1,12 +1,8 @@