media assets: add thumbnail view to /media_assets page.
Add a thumbnail view to the /media_assets page. This page lets you see all images uploaded to Danbooru by all users (although you can't see who the uploader is). Also add a link to this page in the subnav bar on the upload page.
This commit is contained in:
17
app/components/media_asset_gallery_component.rb
Normal file
17
app/components/media_asset_gallery_component.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class MediaAssetGalleryComponent < ApplicationComponent
|
||||
DEFAULT_SIZE = 180
|
||||
|
||||
attr_reader :inline, :size, :options
|
||||
|
||||
renders_many :media_assets, MediaAssetPreviewComponent
|
||||
renders_one :footer
|
||||
|
||||
def initialize(inline: false, size: DEFAULT_SIZE, **options)
|
||||
super
|
||||
@inline = inline
|
||||
@size = size
|
||||
@option = options
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user