Radish alpha
r
Radicle desktop app
Radicle
Git (anonymous pull)
Log in to clone via SSH
Link patch breadcrumb to its current status filter
Brandon Oxendine committed 14 days ago
commit 62752f63573e282275f62afc1242f8e141f29b80
parent ec49ecbd36d057f0035dfa0c4933ec6a6f877709
2 files changed +10 -2
modified src/lib/utils.ts
@@ -175,6 +175,13 @@ export const patchStatusBackgroundColor: Record<
  merged: "var(--color-surface-merged)",
};

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

export function authorForNodeId(author: Author): ComponentProps<typeof NodeId> {
  return { publicKey: publicKeyFromDid(author.did), alias: author.alias };
}
modified src/views/repo/Patch.svelte
@@ -18,6 +18,7 @@
    explorerUrl,
    patchStatusBackgroundColor,
    patchStatusColor,
+
    patchStatusLabel,
  } from "@app/lib/utils";

  import { announce } from "@app/components/AnnounceSwitch.svelte";
@@ -287,9 +288,9 @@
              router.push({
                resource: "repo.patches",
                rid: repo.rid,
-
                status: undefined,
+
                status: patch.state.status,
              })}>
-
            All Patches
+
            {patchStatusLabel[patch.state.status]}
          </button>
          <Icon name="chevron-right" />
          <Id id={patch.id} clipboard={patch.id} placement="bottom-start" />