Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Link issue and patch breadcrumbs to their status filter
Brandon Oxendine committed 1 month ago
commit a4c6f04028c109e281e6f6682a907e466a4d50e0
parent 9e669eaf05b999406851072d92ae40ee24bfd495
2 files changed +16 -2
modified src/views/repos/Issue.svelte
@@ -52,6 +52,11 @@
    issue.discussion[0].edits.length > 1
      ? issue.discussion[0].edits.at(-1)
      : undefined;
+

+
  const issueStatusLabel: Record<Issue["state"]["status"], string> = {
+
    open: "Open Issues",
+
    closed: "Closed Issues",
+
  };
</script>

<style>
@@ -132,8 +137,9 @@
        resource: "repo.issues",
        repo: repo.rid,
        node: baseUrl,
+
        status: issue.state.status,
      }}>
-
      Issues
+
      {issueStatusLabel[issue.state.status]}
    </Link>
    <Separator />
    <span class="txt-id">
modified src/views/repos/Patch.svelte
@@ -87,6 +87,13 @@
  export let nodeId: string;
  export let nodeAvatarUrl: string | undefined;

+
  const patchStatusLabel: Record<Patch["state"]["status"], string> = {
+
    draft: "Draft Patches",
+
    open: "Open Patches",
+
    archived: "Archived Patches",
+
    merged: "Merged Patches",
+
  };
+

  function badgeColor(status: string): ComponentProps<Badge>["variant"] {
    if (status === "draft") {
      return "draft";
@@ -308,8 +315,9 @@
        resource: "repo.patches",
        repo: repo.rid,
        node: baseUrl,
+
        search: `status=${patch.state.status}`,
      }}>
-
      Patches
+
      {patchStatusLabel[patch.state.status]}
    </Link>
    <Separator />
    <span class="txt-id">