Files
danbooru/app/components/media_asset_component.rb
evazion 4ad554e28b 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.
2022-01-30 22:39:54 -06:00

14 lines
380 B
Ruby

# 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