feat: show edit indicator for posts (#90)
This commit is contained in:
parent
d177753775
commit
2c774eba98
|
@ -82,11 +82,14 @@ const timeago = useTimeAgo(() => status.createdAt, {
|
|||
<div flex>
|
||||
<StatusAccountDetails :account="status.account" />
|
||||
<div flex-auto />
|
||||
<CommonTooltip :content="createdAt">
|
||||
<time text-sm op50 hover:underline :title="status.createdAt" :datetime="status.createdAt">
|
||||
{{ timeago }}
|
||||
</time>
|
||||
</CommonTooltip>
|
||||
<div text-sm op50 flex="~ row nowrap" hover:underline>
|
||||
<CommonTooltip :content="createdAt">
|
||||
<time :title="status.createdAt" :datetime="status.createdAt">
|
||||
{{ timeago }}
|
||||
</time>
|
||||
</CommonTooltip>
|
||||
<StatusEditIndicator v-if="status.editedAt" :edited-at="status.editedAt" />
|
||||
</div>
|
||||
</div>
|
||||
<StatusReplyingTo v-if="status.inReplyToAccountId" :status="status" pt1 />
|
||||
<div>
|
||||
|
|
11
components/status/StatusEditIndicator.vue
Normal file
11
components/status/StatusEditIndicator.vue
Normal 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> *</time>
|
||||
</CommonTooltip>
|
||||
</template>
|
Loading…
Reference in a new issue