Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Display all projects on local node
Sebastian Martinez committed 2 years ago
commit fe7cd1b4e52d15c27f89e23d98e8ccad9c3a8bff
parent 786f11169d11a193b585ed9745a5bc9d00911c3e
1 file changed +6 -22
modified src/views/nodes/View.svelte
@@ -1,11 +1,5 @@
<script lang="ts">
-
  import type {
-
    BaseUrl,
-
    NodeStats,
-
    Policy,
-
    ProjectListQuery,
-
    Scope,
-
  } from "@httpd-client";
+
  import type { BaseUrl, NodeStats, Policy, Scope } from "@httpd-client";
  import type { ComponentProps } from "svelte";
  import type { ProjectInfo } from "@app/components/ProjectCard";

@@ -38,20 +32,10 @@
    | undefined;

  onMount(async () => {
-
    const query: ProjectListQuery = { show: "all" };
-
    await api
-
      .getStats()
-
      .then(({ repos: { total } }) => (query.perPage = total))
-
      .catch(e => {
-
        console.error(
-
          "Not able to query to total repo count for your local node.",
-
          e,
-
        );
-
      });
-

-
    localProjects = await fetchProjectInfos(api.baseUrl, query).catch(
-
      error => error,
-
    );
+
    localProjects = await fetchProjectInfos(api.baseUrl, {
+
      show: "all",
+
      perPage: stats.repos.total,
+
    }).catch(error => error);
  });

  function isSeeding(projectId: string) {
@@ -183,7 +167,7 @@
      </div>

      <div style:margin-top="1rem">
-
        {#await fetchProjectInfos( baseUrl, { show: isLocal(baseUrl.hostname) ? "all" : "pinned" }, )}
+
        {#await fetchProjectInfos( baseUrl, { show: isLocal(baseUrl.hostname) ? "all" : "pinned", perPage: stats.repos.total }, )}
          <Loading small center />
        {:then projectInfos}
          <div class="project-grid">