Radish alpha
r
rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5
Radicle web interface
Radicle
Git
Fix alias support in issue assignees
Sebastian Martinez committed 1 year ago
commit 2b058a104dfb63d4c40bc9a6549385d204af61b1
parent 9586853
2 files changed +7 -17
modified src/views/repos/Cob/Assignees.svelte
@@ -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>
modified src/views/repos/Issue.svelte
@@ -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>