First ui view of preview images for items

Users can choose to not show them via ui settings
This commit is contained in:
Eike Kettner
2020-11-08 15:11:00 +01:00
parent 7ba6baf6f0
commit 2c96590aad
6 changed files with 50 additions and 2 deletions

View File

@ -19,6 +19,7 @@ type Field
| Date
| DueDate
| Direction
| PreviewImage
all : List Field
@ -33,6 +34,7 @@ all =
, Date
, DueDate
, Direction
, PreviewImage
]
@ -71,6 +73,9 @@ fromString str =
"direction" ->
Just Direction
"preview" ->
Just PreviewImage
_ ->
Nothing
@ -105,6 +110,9 @@ toString field =
Direction ->
"direction"
PreviewImage ->
"preview"
label : Field -> String
label field =
@ -136,6 +144,9 @@ label field =
Direction ->
"Direction"
PreviewImage ->
"Preview Image"
fromList : List String -> List Field
fromList strings =