From aec867b30036fd039113e4197ca98566447efec6 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 10 Jun 2021 12:08:31 +0300 Subject: [PATCH] Moved greentext to RichContent, improved how first mentions are restored, now shows mentions not uh, mention in post body --- src/components/mention_link/mention_link.js | 1 + src/components/mentions_line/mentions_line.js | 8 +- .../mentions_line/mentions_line.vue | 14 +-- src/components/rich_content/rich_content.jsx | 112 +++++++++++++++++- src/components/status/status.js | 25 +++- src/components/status/status.vue | 4 +- src/components/status_body/status_body.js | 60 ++-------- src/components/status_body/status_body.vue | 20 ++-- 8 files changed, 166 insertions(+), 78 deletions(-) diff --git a/src/components/mention_link/mention_link.js b/src/components/mention_link/mention_link.js index acd0f584ed..559250c517 100644 --- a/src/components/mention_link/mention_link.js +++ b/src/components/mention_link/mention_link.js @@ -6,6 +6,7 @@ const MentionLink = { name: 'MentionLink', props: { url: { + required: true, type: String }, content: { diff --git a/src/components/mentions_line/mentions_line.js b/src/components/mentions_line/mentions_line.js index 4b20d86155..e52045ec80 100644 --- a/src/components/mentions_line/mentions_line.js +++ b/src/components/mentions_line/mentions_line.js @@ -4,7 +4,7 @@ import { mapGetters } from 'vuex' const MentionsLine = { name: 'MentionsLine', props: { - attentions: { + mentions: { required: true, type: Array } @@ -20,11 +20,11 @@ const MentionsLine = { limit () { return 6 }, - mentions () { - return this.attentions.slice(0, this.limit) + mentionsComputed () { + return this.mentions.slice(0, this.limit) }, extraMentions () { - return this.attentions.slice(this.limit) + return this.mentions.slice(this.limit) }, manyMentions () { return this.extraMentions.length > 0 diff --git a/src/components/mentions_line/mentions_line.vue b/src/components/mentions_line/mentions_line.vue index 58f3de6f6f..f4b3abb907 100644 --- a/src/components/mentions_line/mentions_line.vue +++ b/src/components/mentions_line/mentions_line.vue @@ -1,11 +1,11 @@