mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-20 22:00:43 +08:00
Fix alias color in review
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
This commit is contained in:
@@ -1,15 +1,19 @@
|
||||
<script lang="ts" context="module">
|
||||
export type AuthorAliasColor =
|
||||
| "--color-primary-5"
|
||||
| "--color-foreground-5"
|
||||
| "--color-positive-5"
|
||||
| "--color-negative-5"
|
||||
| undefined;
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import Avatar from "@app/components/Avatar.svelte";
|
||||
import { formatNodeId, formatTimestamp } from "@app/lib/utils";
|
||||
|
||||
export let authorId: string;
|
||||
export let authorAlias: string | undefined = undefined;
|
||||
export let authorAliasColor:
|
||||
| "--color-primary-5"
|
||||
| "--color-foreground-5"
|
||||
| "--color-positive-5"
|
||||
| "--color-negative-5"
|
||||
| undefined = "--color-foreground-5";
|
||||
export let authorAliasColor: AuthorAliasColor = "--color-foreground-5";
|
||||
export let caption: string | undefined = undefined;
|
||||
export let noAvatar: boolean = false;
|
||||
export let timestamp: number | undefined = undefined;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<script lang="ts" strictEvents>
|
||||
import type { AuthorAliasColor } from "@app/components/Authorship.svelte";
|
||||
|
||||
import Authorship from "@app/components/Authorship.svelte";
|
||||
import Button from "@app/components/Button.svelte";
|
||||
import Icon from "@app/components/Icon.svelte";
|
||||
@@ -9,6 +11,7 @@
|
||||
export let id: string | undefined = undefined;
|
||||
export let authorId: string;
|
||||
export let authorAlias: string | undefined = undefined;
|
||||
export let authorAliasColor: AuthorAliasColor = "--color-foreground-5";
|
||||
export let timestamp: number;
|
||||
export let body: string;
|
||||
export let showReplyIcon: boolean = false;
|
||||
@@ -49,7 +52,12 @@
|
||||
|
||||
<div class="card" {id}>
|
||||
<div class="card-header">
|
||||
<Authorship {caption} {authorId} {authorAlias} {timestamp} />
|
||||
<Authorship
|
||||
{caption}
|
||||
{authorId}
|
||||
{authorAlias}
|
||||
{authorAliasColor}
|
||||
{timestamp} />
|
||||
<div class="actions">
|
||||
{#if showReplyIcon}
|
||||
<Button
|
||||
|
||||
@@ -351,6 +351,7 @@
|
||||
caption={formatVerdict(revisionId, review.verdict)}
|
||||
authorId={author}
|
||||
authorAlias={review.author.alias}
|
||||
authorAliasColor={aliasColorForVerdict(review.verdict)}
|
||||
timestamp={review.timestamp}
|
||||
rawPath={utils.getRawBasePath(projectId, baseUrl, projectHead)}
|
||||
body={review.comment} />
|
||||
|
||||
Reference in New Issue
Block a user