feat: show edit indicator for posts (#90)

zio/stable
Shinigami 2022-11-25 17:34:53 +01:00 committed by GitHub
parent d177753775
commit 2c774eba98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 5 deletions

View File

@ -82,11 +82,14 @@ const timeago = useTimeAgo(() => status.createdAt, {
<div flex> <div flex>
<StatusAccountDetails :account="status.account" /> <StatusAccountDetails :account="status.account" />
<div flex-auto /> <div flex-auto />
<CommonTooltip :content="createdAt"> <div text-sm op50 flex="~ row nowrap" hover:underline>
<time text-sm op50 hover:underline :title="status.createdAt" :datetime="status.createdAt"> <CommonTooltip :content="createdAt">
{{ timeago }} <time :title="status.createdAt" :datetime="status.createdAt">
</time> {{ timeago }}
</CommonTooltip> </time>
</CommonTooltip>
<StatusEditIndicator v-if="status.editedAt" :edited-at="status.editedAt" />
</div>
</div> </div>
<StatusReplyingTo v-if="status.inReplyToAccountId" :status="status" pt1 /> <StatusReplyingTo v-if="status.inReplyToAccountId" :status="status" pt1 />
<div> <div>

View File

@ -0,0 +1,11 @@
<script setup lang="ts">
const props = defineProps<{ editedAt: string }>()
const editedAt = useFormattedDateTime(props.editedAt)
</script>
<template>
<CommonTooltip :content="`Edited ${editedAt}`">
<time :title="props.editedAt" :datetime="props.editedAt" underline decoration-dashed>&nbsp;*</time>
</CommonTooltip>
</template>