posts: always show "resized to X%" notice on mobile.

Always show the "Resized to X% of original" notice when viewing a sample
image on mobile.
This commit is contained in:
evazion
2020-07-31 15:07:36 -05:00
parent 1c6451b4c7
commit 3fe18c57d0
3 changed files with 11 additions and 3 deletions

View File

@@ -67,7 +67,7 @@
</div>
<% end %>
<% if policy(post).visible? && post.has_large? && !post.is_ugoira? %>
<% if policy(post).visible? && post.has_large? && !post.is_ugoira? && post.resize_percentage.floor < 100 %>
<div class="notice notice-small post-notice post-notice-resized" id="image-resize-notice">
Resized to <%= number_to_percentage post.resize_percentage.floor, precision: 0 %> of original (<%= link_to "view original", post.tagged_file_url, class: "image-view-original-link" %>)
</div>