logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: ed8bc6102290cb50d44c1c7aa5696aac5624d907
parent 08c9aa4bf3a06531516cf72b9ffc00b44ee51d75
Author: Tusooa Zhu <tusooa@kazv.moe>
Date:   Wed, 22 Jun 2022 16:05:27 -0400

Add last edited at indicator in status

Diffstat:

Msrc/components/status/status.js6++++++
Msrc/components/status/status.scss3++-
Msrc/components/status/status.vue24++++++++++++++++++++++++
3 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/src/components/status/status.js b/src/components/status/status.js @@ -392,6 +392,12 @@ const Status = { }, visibilityLocalized () { 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: { diff --git a/src/components/status/status.scss b/src/components/status/status.scss @@ -156,7 +156,8 @@ margin-right: 0.2em; } - & .heading-reply-row { + & .heading-reply-row, + & .heading-edited-row { position: relative; align-content: baseline; font-size: 0.85em; diff --git a/src/components/status/status.vue b/src/components/status/status.vue @@ -328,6 +328,30 @@ class="mentions-line" /> </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> <StatusContent