diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2022-10-26 13:42:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-26 13:42:29 +0200 |
commit | f8ca3bb2a1dd648f41e8fea5b5eb87b53bc8d521 (patch) | |
tree | 442181ac32f6c8a9601619aa9c94635c09fc02ce /app/views/admin/reports/_media_attachments.html.haml | |
parent | dee69be60ef72f714ca3cbbd47e83f1015332f06 (diff) |
Add ability to view previous edits of a status in admin UI (#19462)
* Add ability to view previous edits of a status in admin UI * Change moderator access to posts to be controlled by a separate policy
Diffstat (limited to 'app/views/admin/reports/_media_attachments.html.haml')
-rw-r--r-- | app/views/admin/reports/_media_attachments.html.haml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/views/admin/reports/_media_attachments.html.haml b/app/views/admin/reports/_media_attachments.html.haml new file mode 100644 index 000000000..d0b7d52c3 --- /dev/null +++ b/app/views/admin/reports/_media_attachments.html.haml @@ -0,0 +1,8 @@ +- if status.ordered_media_attachments.first.video? + - video = status.ordered_media_attachments.first + = react_component :video, src: video.file.url(:original), preview: video.file.url(:small), frameRate: video.file.meta.dig('original', 'frame_rate'), blurhash: video.blurhash, sensitive: status.sensitive?, visible: false, width: 610, height: 343, inline: true, alt: video.description, media: [ActiveModelSerializers::SerializableResource.new(video, serializer: REST::MediaAttachmentSerializer)].as_json +- elsif status.ordered_media_attachments.first.audio? + - audio = status.ordered_media_attachments.first + = react_component :audio, src: audio.file.url(:original), height: 110, alt: audio.description, duration: audio.file.meta.dig(:original, :duration) +- else + = react_component :media_gallery, height: 343, sensitive: status.sensitive?, visible: false, media: status.ordered_media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json } |