Fix alias support in issue assignees

We weren't passing the aliases into the Assignees when displaying
issues, which left us only with the did of the assignee.
This commit is contained in:
Sebastian Martinez
2024-10-14 22:51:33 +02:00
parent 9586853a99
commit 2b058a104d
2 changed files with 7 additions and 17 deletions
+5 -15
View File
@@ -1,11 +1,10 @@
<script lang="ts">
import type { Reaction } from "@http-client";
import type { BaseUrl, Reaction } from "@http-client";
import { formatNodeId } from "@app/lib/utils";
import Avatar from "@app/components/Avatar.svelte";
import Badge from "@app/components/Badge.svelte";
import NodeId from "@app/components/NodeId.svelte";
export let baseUrl: BaseUrl;
export let assignees: Reaction["authors"] = [];
</script>
@@ -21,12 +20,6 @@
gap: 0.5rem;
font-size: var(--font-size-small);
}
.assignee {
display: flex;
align-items: center;
width: 100%;
gap: 0.25rem;
}
@media (max-width: 1349.98px) {
.wrapper {
display: flex;
@@ -54,12 +47,9 @@
<div class="wrapper">
<div class="header">Assignees</div>
<div class="body">
{#each assignees as { id }}
{#each assignees as { alias, id }}
<Badge variant="neutral" size="small">
<div class="assignee">
<Avatar variant="small" nodeId={id} />
<span>{formatNodeId(id)}</span>
</div>
<NodeId {baseUrl} nodeId={id} {alias} />
</Badge>
{:else}
<div class="txt-missing no-assignees">No assignees</div>
+2 -2
View File
@@ -205,7 +205,7 @@
<div
style:margin-top="2rem"
style="display: flex; flex-direction: column; gap: 0.5rem;">
<Assignees assignees={issue.assignees} />
<Assignees {baseUrl} assignees={issue.assignees} />
<Labels labels={issue.labels} />
<Embeds embeds={uniqueEmbeds} />
</div>
@@ -248,7 +248,7 @@
</div>
</div>
<div class="metadata global-hide-on-medium-desktop-down">
<Assignees assignees={issue.assignees} />
<Assignees {baseUrl} assignees={issue.assignees} />
<Labels labels={issue.labels} />
<Embeds embeds={uniqueEmbeds} />
</div>