uploads: allow changing thumbnail size on My Uploads / All Uploads pages.

* Add a "Size" menu to the My Uploads / All Uploads pages to allow
  changing the thumbnail size.
* Make the My Uploads / All Uploads pages use the same thumbnail size as
  the post index page.
* Change the "Gallery | Table" links on the My Uploads page to icons.
This commit is contained in:
evazion
2022-02-16 14:11:02 -06:00
parent f890e8595e
commit 0b8d042c06
19 changed files with 127 additions and 91 deletions

View File

@@ -1,18 +1,9 @@
<div class="flex items-center mb-2">
<h1 class="flex-1">My Uploads</h1>
<span>
<strong>Gallery</strong> |
<%= link_to "Table", user_uploads_path(CurrentUser.user.id.to_i, mode: "table") %>
</span>
</div>
<%= render(MediaAssetGalleryComponent.new) do |gallery| %>
<% @uploads.each do |upload| %>
<%= render(MediaAssetGalleryComponent.new(size: size)) do |gallery| %>
<% uploads.each do |upload| %>
<% gallery.media_asset do %>
<%= render "uploads/preview", upload: upload, size: gallery.size %>
<% end %>
<% end %>
<% end %>
<%= numbered_paginator(@uploads) %>
<%= numbered_paginator(uploads) %>