mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-27 22:01:35 +01:00
17 lines
861 B
Text
17 lines
861 B
Text
- if status.ordered_media_attachments.first.video?
|
|
= render_video_component(status, visible: false)
|
|
- elsif status.ordered_media_attachments.first.audio?
|
|
- audio = status.ordered_media_attachments.first
|
|
= react_component :audio,
|
|
alt: audio.description,
|
|
duration: audio.file.meta.dig(:original, :duration),
|
|
height: 110,
|
|
lang: status.language,
|
|
src: audio.file.url(:original)
|
|
- else
|
|
= react_component :media_gallery,
|
|
height: 343,
|
|
lang: status.language,
|
|
media: status.ordered_media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json },
|
|
sensitive: status.sensitive?,
|
|
visible: false
|