diff options
| author | Sean King <seanking2919@protonmail.com> | 2022-07-11 01:36:01 +0000 |
|---|---|---|
| committer | Sean King <seanking2919@protonmail.com> | 2022-07-11 01:36:01 +0000 |
| commit | 65b0b69f109c42f07fe14c764d6a4e01bd763a83 (patch) | |
| tree | 770400e536a59d034fb475e98985d7131e66ff2c /src | |
| parent | e764fbe8b680d9b60fba3074de3ee2db88b3b674 (diff) | |
| parent | acd53957e09a499b04c8f901e5829607f7363b57 (diff) | |
Merge branch 'from/edit-status/tusooa/indicator' into 'add/edit-status'
Edited indicator on status
See merge request seanking/pleroma-fe!4
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/status/status.js | 6 | ||||
| -rw-r--r-- | src/components/status/status.scss | 3 | ||||
| -rw-r--r-- | src/components/status/status.vue | 24 | ||||
| -rw-r--r-- | src/i18n/en.json | 1 |
4 files changed, 33 insertions, 1 deletions
diff --git a/src/components/status/status.js b/src/components/status/status.js index a925f30b..b7f20374 100644 --- 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 index b3ad3818..ada9841e 100644 --- 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 index 67ce999a..00462f0a 100644 --- 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 && !isPreview" + 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 diff --git a/src/i18n/en.json b/src/i18n/en.json index f125c249..c4a044f5 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -748,6 +748,7 @@ "repeats": "Repeats", "delete": "Delete status", "edit": "Edit status", + "edited_at": "(last edited {time})", "pin": "Pin on profile", "unpin": "Unpin from profile", "pinned": "Pinned", |
