From 227854b16d1174d1d4ab198b727746785907df25 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 acd0f584..559250c5 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 4b20d861..e52045ec 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 58f3de6f..f4b3abb9 100644 --- a/src/components/mentions_line/mentions_line.vue +++ b/src/components/mentions_line/mentions_line.vue @@ -1,11 +1,11 @@