Add last edited at indicator in status

This commit is contained in:
Tusooa Zhu 2022-06-22 16:05:27 -04:00 committed by FloatingGhost
parent 6fabf0b4f1
commit 92790cf6b4
3 changed files with 32 additions and 1 deletions

View file

@ -437,6 +437,12 @@ const Status = {
}, },
visibilityLocalized () { visibilityLocalized () {
return this.$i18n.t('general.scope_in_timeline.' + this.status.visibility) return this.$i18n.t('general.scope_in_timeline.' + this.status.visibility)
},
isEdited () {
return this.status.edited_at !== null
},
editingAvailable () {
return this.$store.state.instance.editingAvailable
} }
}, },
methods: { methods: {

View file

@ -160,7 +160,8 @@
margin-right: 0.2em; margin-right: 0.2em;
} }
& .heading-reply-row { & .heading-reply-row,
& .heading-edited-row {
position: relative; position: relative;
align-content: baseline; align-content: baseline;
font-size: 0.85em; font-size: 0.85em;

View file

@ -329,6 +329,30 @@
class="mentions-line" class="mentions-line"
/> />
</div> </div>
<div
v-if="isEdited && editingAvailable"
class="heading-edited-row"
>
<i18n-t
keypath="status.edited_at"
tag="span"
>
<template #time>
<i18n-t
keypath="time.in_past"
tag="span"
>
<template>
<Timeago
:time="status.edited_at"
:auto-update="60"
:long-format="true"
/>
</template>
</i18n-t>
</template>
</i18n-t>
</div>
</div> </div>
<StatusContent <StatusContent