adds trail date field

This commit is contained in:
Christian Beutel
2024-04-05 16:39:50 +02:00
parent 8f71952a71
commit 2a2a49fd94
18 changed files with 176 additions and 10 deletions

View File

@@ -14,10 +14,9 @@
let editedComment = comment.text;
const avatarSrc =
comment.expand && comment.expand.author
? getFileURL(comment.expand?.author, comment.expand?.author.avatar)
: "https://api.dicebear.com/7.x/initials/svg?seed=comment&backgroundType=gradientLinear";
const avatarSrc = comment.expand?.author.avatar
? getFileURL(comment.expand.author, comment.expand.author.avatar)
: `https://api.dicebear.com/7.x/initials/svg?seed=${comment.expand?.author.username ?? ""}&backgroundType=gradientLinear`;
function deleteComment() {
dispatch("delete", comment);
@@ -31,7 +30,11 @@
}
</script>
<div class="flex gap-4 items-center" in:fade={{duration: 150}} out:fade={{duration: 150}}>
<div
class="flex gap-4 items-center"
in:fade={{ duration: 150 }}
out:fade={{ duration: 150 }}
>
<img class="rounded-full w-10 aspect-square" src={avatarSrc} alt="avatar" />
<div>
<div class="flex items-center">