feat(status): add edit indicator for detail
This commit is contained in:
parent
0ada9e0448
commit
d146b5b730
5 changed files with 30 additions and 9 deletions
|
@ -1,11 +1,20 @@
|
|||
<script setup lang="ts">
|
||||
const props = defineProps<{ editedAt: string }>()
|
||||
import type { Status } from 'masto'
|
||||
|
||||
const editedAt = useFormattedDateTime(props.editedAt)
|
||||
const { status } = defineProps<{
|
||||
status: Status
|
||||
}>()
|
||||
|
||||
const editedAt = $computed(() => status.editedAt)
|
||||
const formatted = useFormattedDateTime(status.editedAt)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<CommonTooltip :content="`Edited ${editedAt}`">
|
||||
<time :title="props.editedAt" :datetime="props.editedAt" underline decoration-dashed> *</time>
|
||||
<CommonTooltip v-if="editedAt" :content="`Edited ${formatted}`">
|
||||
<time
|
||||
:title="editedAt"
|
||||
:datetime="editedAt"
|
||||
font-bold underline decoration-dashed
|
||||
> *</time>
|
||||
</CommonTooltip>
|
||||
</template>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue