Add alias to Patch

Signed-off-by: xphoniex <dj.2dixx@gmail.com>
This commit is contained in:
xphoniex
2023-05-29 12:14:17 +00:00
parent 46494461f2
commit 39874d8d51
4 changed files with 56 additions and 19 deletions
+8 -5
View File
@@ -4,6 +4,12 @@
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 caption: string | undefined = undefined;
export let noAvatar: boolean = false;
export let timestamp: number | undefined = undefined;
@@ -28,9 +34,6 @@
.body {
white-space: nowrap;
}
.alias {
color: var(--color-foreground-5);
}
</style>
<span class="authorship txt-tiny">
@@ -40,13 +43,13 @@
<span class="id layout-desktop">
{formatNodeId(authorId)}
{#if authorAlias}
<span class="alias">({authorAlias})</span>
<span style:color="var({authorAliasColor})">({authorAlias})</span>
{/if}
</span>
<span class="id layout-mobile">
{formatNodeId(authorId).replace("did:key:", "")}
{#if authorAlias}
<span class="alias">({authorAlias})</span>
<span style:color="var({authorAliasColor})">({authorAlias})</span>
{/if}
</span>
{#if !caption}