mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-10-18 19:30:27 +08:00
Link issue and patch breadcrumbs to their status filter
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user