From 53dc3f470b71fba5ab386aeb1df78ba349d98121 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 23 Jul 2021 15:47:34 +0200 Subject: [PATCH] Allow post edition by remote moderator Signed-off-by: Thomas Citharel --- js/src/views/Posts/Edit.vue | 2 +- js/src/views/Posts/Post.vue | 49 ++++++++++++++++++++++++++++++++++++- 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/js/src/views/Posts/Edit.vue b/js/src/views/Posts/Edit.vue index 97d9d9305..cb2531e45 100644 --- a/js/src/views/Posts/Edit.vue +++ b/js/src/views/Posts/Edit.vue @@ -207,7 +207,7 @@ import { FETCH_GROUP } from "@/graphql/group"; variables() { return { id: this.currentActor.id, - group: this.actualGroup.preferredUsername, + group: usernameWithDomain(this.actualGroup), }; }, skip() { diff --git a/js/src/views/Posts/Post.vue b/js/src/views/Posts/Post.vue index bd83c47c3..221f87e15 100644 --- a/js/src/views/Posts/Post.vue +++ b/js/src/views/Posts/Post.vue @@ -24,6 +24,29 @@ {{ post.publishAt | formatDateTimeString }} + + + {{ + $t("Edited {relative_time} ago", { + relative_time: formatDistanceToNowStrict( + new Date(post.updatedAt), + { + locale: $dateFnsLocale, + } + ), + }) + }} +