This repository has been archived on 2024-07-31. You can view files and clone it, but cannot push or open issues or pull requests.
2022-10-26 07:42:29 -04:00
|
|
|
- if status.ordered_media_attachments.first.video?
|
2023-09-05 14:05:58 -04:00
|
|
|
= render_video_component(status, visible: false)
|
2022-10-26 07:42:29 -04:00
|
|
|
- elsif status.ordered_media_attachments.first.audio?
|
|
|
|
- audio = status.ordered_media_attachments.first
|
2024-01-11 08:14:24 -05:00
|
|
|
= react_component :audio,
|
|
|
|
alt: audio.description,
|
|
|
|
duration: audio.file.meta.dig(:original, :duration),
|
|
|
|
height: 110,
|
|
|
|
lang: status.language,
|
|
|
|
src: audio.file.url(:original)
|
2022-10-26 07:42:29 -04:00
|
|
|
- else
|
2024-01-11 08:14:24 -05:00
|
|
|
= 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
|