From c6a9b9dc030581ea4b2d660db4d7b49bcad71e16 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Fri, 13 Aug 2021 12:19:57 +0300 Subject: [PATCH] support richcontent in polls --- src/components/poll/poll.js | 10 +++++++--- src/components/poll/poll.vue | 6 ++---- src/components/status_content/status_content.vue | 2 +- .../entity_normalizer/entity_normalizer.service.js | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/components/poll/poll.js b/src/components/poll/poll.js index 98db5582..a69b7886 100644 --- a/src/components/poll/poll.js +++ b/src/components/poll/poll.js @@ -1,10 +1,14 @@ -import Timeago from '../timeago/timeago.vue' +import Timeago from 'components/timeago/timeago.vue' +import RichContent from 'components/rich_content/rich_content.jsx' import { forEach, map } from 'lodash' export default { name: 'Poll', - props: ['basePoll'], - components: { Timeago }, + props: ['basePoll', 'emoji'], + components: { + Timeago, + RichContent + }, data () { return { loading: false, diff --git a/src/components/poll/poll.vue b/src/components/poll/poll.vue index 187d1829..6e0234b3 100644 --- a/src/components/poll/poll.vue +++ b/src/components/poll/poll.vue @@ -17,8 +17,7 @@ {{ percentageForOption(option.votes_count) }}% - - +
diff --git a/src/components/status_content/status_content.vue b/src/components/status_content/status_content.vue index 23c90913..3f65e64a 100644 --- a/src/components/status_content/status_content.vue +++ b/src/components/status_content/status_content.vue @@ -7,7 +7,7 @@ @parseReady="$emit('parseReady', $event)" >
- +
{ if (output.poll) { output.poll.options = (output.poll.options || []).map(field => ({ ...field, - title_html: addEmojis(escape(field.title), data.emojis) + title_html: escape(field.title) })) } output.pinned = data.pinned