mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-23 10:58:26 +00:00
Move card size definition in css and fix height bug
For very tall images (sometimes shopping receipts), the height must be restricted, too.
This commit is contained in:
@ -179,7 +179,7 @@ view cfg settings model item =
|
||||
pageCountLabel =
|
||||
div
|
||||
[ classList
|
||||
[ ( "card-attachment-nav", True )
|
||||
[ ( "card-attachment-nav top", True )
|
||||
, ( "invisible", pageCount == 0 || (item.fileCount == 1 && pageCount == 1) )
|
||||
]
|
||||
]
|
||||
@ -227,7 +227,10 @@ view cfg settings model item =
|
||||
span [ class "invisible" ] []
|
||||
|
||||
else
|
||||
div [ class "image" ]
|
||||
div
|
||||
[ class "image ds-card-image"
|
||||
, Data.UiSettings.cardPreviewSize settings
|
||||
]
|
||||
[ img
|
||||
[ class "preview-image"
|
||||
, src previewUrl
|
||||
|
@ -226,15 +226,8 @@ fieldHidden settings field =
|
||||
|
||||
cardPreviewSize : UiSettings -> Attribute msg
|
||||
cardPreviewSize settings =
|
||||
case settings.cardPreviewSize of
|
||||
Data.BasicSize.Small ->
|
||||
HA.style "max-width" "80px"
|
||||
|
||||
Data.BasicSize.Medium ->
|
||||
HA.style "max-width" "160px"
|
||||
|
||||
Data.BasicSize.Large ->
|
||||
HA.style "max-width" "none"
|
||||
Data.BasicSize.asString settings.cardPreviewSize
|
||||
|> HA.class
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user