|
|
@ -25,9 +25,11 @@ |
|
|
|
- if !status.media_attachments.empty? |
|
|
|
- if !status.media_attachments.empty? |
|
|
|
- if status.media_attachments.first.video? |
|
|
|
- if status.media_attachments.first.video? |
|
|
|
- video = status.media_attachments.first |
|
|
|
- video = status.media_attachments.first |
|
|
|
= react_component :video, src: video.file.url(:original), preview: video.file.url(:small), sensitive: !current_account&.user&.show_all_media? && status.sensitive? || current_account&.user&.hide_all_media?, width: 670, height: 380, detailed: true, inline: true, alt: video.description |
|
|
|
= react_component :video, src: video.file.url(:original), preview: video.file.url(:small), sensitive: !current_account&.user&.show_all_media? && status.sensitive? || current_account&.user&.hide_all_media?, width: 670, height: 380, detailed: true, inline: true, alt: video.description do |
|
|
|
|
|
|
|
= render partial: 'stream_entries/attachment_list', locals: { attachments: status.media_attachments } |
|
|
|
- else |
|
|
|
- else |
|
|
|
= react_component :media_gallery, height: 380, sensitive: !current_account&.user&.show_all_media? && status.sensitive? || current_account&.user&.hide_all_media?, standalone: true, 'autoPlayGif': current_account&.user&.setting_auto_play_gif || autoplay, 'reduceMotion': current_account&.user&.setting_reduce_motion, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json } |
|
|
|
= react_component :media_gallery, height: 380, sensitive: !current_account&.user&.show_all_media? && status.sensitive? || current_account&.user&.hide_all_media?, standalone: true, 'autoPlayGif': current_account&.user&.setting_auto_play_gif || autoplay, 'reduceMotion': current_account&.user&.setting_reduce_motion, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json } do |
|
|
|
|
|
|
|
= render partial: 'stream_entries/attachment_list', locals: { attachments: status.media_attachments } |
|
|
|
- elsif status.preview_card |
|
|
|
- elsif status.preview_card |
|
|
|
= react_component :card, 'maxDescription': 160, card: ActiveModelSerializers::SerializableResource.new(status.preview_card, serializer: REST::PreviewCardSerializer).as_json |
|
|
|
= react_component :card, 'maxDescription': 160, card: ActiveModelSerializers::SerializableResource.new(status.preview_card, serializer: REST::PreviewCardSerializer).as_json |
|
|
|
|
|
|
|
|
|
|
|