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:
evazion
2022-02-01 23:43:12 -06:00
parent 317d369c6a
commit 92a4d045e2
13 changed files with 140 additions and 35 deletions

View File

@@ -8,6 +8,8 @@ class MediaAssetPreviewComponent < ApplicationComponent
attr_reader :media_asset, :size, :fit, :link_target, :shrink_to_fit, :save_data
delegate :duration_to_hhmmss, :sound_icon, to: :helpers
renders_one :footer
# @param media_asset [MediaAsset] The media asset to show the thumbnail for.
# @param size [String] The size of the thumbnail. One of 150, 180, 225, 270, or 360.
# @param link_target [ApplicationRecord] What the thumbnail links to (default: the media asset).