Link issue and patch breadcrumbs to their status filter

This commit is contained in:
Brandon Oxendine
2026-05-06 12:47:25 +02:00
parent 9e669eaf05
commit a4c6f04028
2 changed files with 16 additions and 2 deletions
+7 -1
View File
@@ -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">
+9 -1
View File
@@ -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">