mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 10:10:30 +08:00
Show edited label on edited comments and issues
If a comment or an issue had at least one additional edit, we show a `edited` label, which on hover shows the standard tooltip with more information on who edited it and when.
This commit is contained in:
@@ -387,6 +387,10 @@
|
||||
$httpdStore.state === "authenticated" && utils.isLocal(baseUrl.hostname)
|
||||
? $httpdStore.session
|
||||
: undefined;
|
||||
$: lastDescriptionEdit =
|
||||
issue.discussion[0].edits.length > 1
|
||||
? issue.discussion[0].edits.pop()
|
||||
: undefined;
|
||||
|
||||
type State = "read" | "edit" | "submit";
|
||||
|
||||
@@ -425,6 +429,10 @@
|
||||
flex-wrap: nowrap;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
.author-metadata {
|
||||
color: var(--color-fill-gray);
|
||||
font-size: var(--font-size-small);
|
||||
}
|
||||
.title {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@@ -571,6 +579,14 @@
|
||||
nodeId={issue.author.id}
|
||||
alias={issue.author.alias} />
|
||||
{utils.formatTimestamp(issue.discussion[0].timestamp)}
|
||||
{#if lastDescriptionEdit}
|
||||
<div class="author-metadata">•</div>
|
||||
<div
|
||||
class="author-metadata"
|
||||
title={utils.formatEditedCaption(lastDescriptionEdit)}>
|
||||
edited
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</CobHeader>
|
||||
{#if threads.length > 0}
|
||||
|
||||
Reference in New Issue
Block a user