uploads: show videos and ugoiras on upload page.
* On the upload page, show the video when uploading a video or ugoira. * On the upload page, show the filesize and resolution beneath the image, instead of above it. * On the media asset show page, show the full video or ugoira instead of just the thumbnail.
This commit is contained in:
13
app/components/media_asset_component.rb
Normal file
13
app/components/media_asset_component.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# A component for showing a full-sized image or video for a media asset.
|
||||
class MediaAssetComponent < ApplicationComponent
|
||||
attr_reader :media_asset
|
||||
|
||||
delegate :image_width, :image_height, :variant, :is_image?, :is_video?, :is_ugoira?, :is_flash?, to: :media_asset
|
||||
|
||||
def initialize(media_asset:)
|
||||
super
|
||||
@media_asset = media_asset
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user