Add support for custom emojis in poll options (#10322)
* Backend changes for custom emoji support in poll options * Serialize poll emojis in REST API * Render custom emojis in poll options * Render custom emoji in poll options on public pages
This commit is contained in:
@ -24,7 +24,7 @@
|
||||
|
||||
- if status.poll
|
||||
= react_component :poll, disabled: true, poll: ActiveModelSerializers::SerializableResource.new(status.poll, serializer: REST::PollSerializer, scope: current_user, scope_name: :current_user).as_json do
|
||||
= render partial: 'stream_entries/poll', locals: { poll: status.poll }
|
||||
= render partial: 'stream_entries/poll', locals: { status: status, poll: status.poll, autoplay: autoplay }
|
||||
- elsif !status.media_attachments.empty?
|
||||
- if status.media_attachments.first.video?
|
||||
- video = status.media_attachments.first
|
||||
|
@ -10,11 +10,11 @@
|
||||
|
||||
%label.poll__text><
|
||||
%span.poll__number= percent.round
|
||||
= option.title
|
||||
= Formatter.instance.format_poll_option(status, option, autoplay: autoplay)
|
||||
- else
|
||||
%label.poll__text><
|
||||
%span.poll__input{ class: poll.multiple? ? 'checkbox' : nil}><
|
||||
= option.title
|
||||
= Formatter.instance.format_poll_option(status, option, autoplay: autoplay)
|
||||
.poll__footer
|
||||
- unless show_results
|
||||
%button.button.button-secondary{ disabled: true }
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
- if status.poll
|
||||
= react_component :poll, disabled: true, poll: ActiveModelSerializers::SerializableResource.new(status.poll, serializer: REST::PollSerializer, scope: current_user, scope_name: :current_user).as_json do
|
||||
= render partial: 'stream_entries/poll', locals: { poll: status.poll }
|
||||
= render partial: 'stream_entries/poll', locals: { status: status, poll: status.poll, autoplay: autoplay }
|
||||
- elsif !status.media_attachments.empty?
|
||||
- if status.media_attachments.first.video?
|
||||
- video = status.media_attachments.first
|
||||
|
Reference in New Issue
Block a user