Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Add `alias` to `Issue`/`IssueTeaser`
xphoniex committed 3 years ago
commit 3eab5b9d62a1c8083141bcf9b069eb2370eb1e2a
parent 04bae0ade61f4151878e41a10d75b5bd41026f8c
3 files changed +6 -4
modified httpd-client/lib/project/issue.ts
@@ -18,7 +18,7 @@ const issueStateSchema = union([

export interface Issue {
  id: string;
-
  author: { id: string };
+
  author: { id: string; alias?: string };
  title: string;
  state: IssueState;
  discussion: Comment[];
@@ -28,7 +28,7 @@ export interface Issue {

export const issueSchema = strictObject({
  id: string(),
-
  author: strictObject({ id: string() }),
+
  author: strictObject({ id: string(), alias: string().optional() }),
  title: string(),
  state: issueStateSchema,
  discussion: array(commentSchema),
modified src/views/projects/Issue.svelte
@@ -238,7 +238,9 @@
          rawPath={utils.getRawBasePath(projectId, baseUrl, projectHead)} />
      </div>
      <div class="author" slot="author">
-
        opened by <Authorship authorId={issue.author.id} />
+
        opened by <Authorship
+
          authorId={issue.author.id}
+
          authorAlias={issue.author.alias} />
        {utils.formatTimestamp(issue.discussion[0].timestamp)}
      </div>
    </CobHeader>
modified src/views/projects/Issue/IssueTeaser.svelte
@@ -140,7 +140,7 @@
      {formatObjectId(issue.id)} opened {formatTimestamp(
        issue.discussion[0].timestamp,
      )} by
-
      <Authorship authorId={issue.author.id} />
+
      <Authorship authorId={issue.author.id} authorAlias={issue.author.alias} />
    </div>
  </div>
  {#if commentCount > 0}