add correct image dimensions
This commit is contained in:
parent
6d49618c54
commit
d981c0b23f
|
@ -72,7 +72,7 @@ file media_root site multifile a = div_
|
||||||
, text " "
|
, text " "
|
||||||
, span_
|
, span_
|
||||||
[ class_ "details" ]
|
[ class_ "details" ]
|
||||||
[ text $ "(" `append` size `append` ", 1280x720, "
|
[ text $ "(" `append` size `append` res_str
|
||||||
, a_
|
, a_
|
||||||
[ download_ orig_file_name
|
[ download_ orig_file_name
|
||||||
, href_ file_url
|
, href_ file_url
|
||||||
|
@ -103,6 +103,13 @@ file media_root site multifile a = div_
|
||||||
size = toMisoString $
|
size = toMisoString $
|
||||||
bytesToHumanReadable (Attachment.file_size_bytes a) True
|
bytesToHumanReadable (Attachment.file_size_bytes a) True
|
||||||
|
|
||||||
|
res_str :: JSString
|
||||||
|
res_str = maybe "" show_dimension $ Attachment.resolution a
|
||||||
|
|
||||||
|
show_dimension :: Attachment.Dimension -> JSString
|
||||||
|
show_dimension Attachment.Dimension {..} = toMisoString $
|
||||||
|
", " ++ show width ++ "x" ++ show height ++ ", "
|
||||||
|
|
||||||
filename_text :: JSString
|
filename_text :: JSString
|
||||||
filename_text
|
filename_text
|
||||||
| Text.length fname > max_original_filename_display_length =
|
| Text.length fname > max_original_filename_display_length =
|
||||||
|
|
Loading…
Reference in New Issue