mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 21:47:59 +01:00
respect scale settings
This commit is contained in:
parent
2a1ceb421e
commit
0d1ae1e436
2 changed files with 4 additions and 1 deletions
|
@ -8,7 +8,7 @@
|
|||
=< link("your current filter", to: Routes.filter_path(@conn, :show, @conn.assigns.current_filter), class: "filter-link")
|
||||
' .
|
||||
|
||||
#image_target.hidden.image-show data-scaled="true" data-uris=Jason.encode!(thumb_urls(@image, can?(@conn, :hide, @image))) data-width=@image.image_width data-height=@image.image_height
|
||||
#image_target.hidden.image-show data-scaled=scaled_value(@conn.assigns.current_user) data-uris=Jason.encode!(thumb_urls(@image, can?(@conn, :hide, @image))) data-width=@image.image_width data-height=@image.image_height
|
||||
= if @image.image_mime_type == "video/webm" do
|
||||
video controls=true
|
||||
- else
|
||||
|
|
|
@ -159,6 +159,9 @@ defmodule PhilomenaWeb.ImageView do
|
|||
def deleter(%{deleter: %{name: name}}), do: name
|
||||
def deleter(_image), do: "System"
|
||||
|
||||
def scaled_value(%{scale_large_images: false}), do: "false"
|
||||
def scaled_value(_user), do: "true"
|
||||
|
||||
defp thumb_format("svg", _name), do: "png"
|
||||
defp thumb_format(_, :rendered), do: "png"
|
||||
defp thumb_format(format, _name), do: format
|
||||
|
|
Loading…
Reference in a new issue