Allow to search in source names in webui

This commit is contained in:
Eike Kettner
2020-11-30 14:26:10 +01:00
parent 0ee8ff66d5
commit 346d23928d
5 changed files with 63 additions and 2 deletions

View File

@ -21,6 +21,7 @@ type Field
| Direction
| PreviewImage
| CustomFields
| SourceName
all : List Field
@ -37,6 +38,7 @@ all =
, Direction
, PreviewImage
, CustomFields
, SourceName
]
@ -81,6 +83,9 @@ fromString str =
"customfields" ->
Just CustomFields
"sourcename" ->
Just SourceName
_ ->
Nothing
@ -121,6 +126,9 @@ toString field =
CustomFields ->
"customfields"
SourceName ->
"sourcename"
label : Field -> String
label field =
@ -158,6 +166,9 @@ label field =
CustomFields ->
"Custom Fields"
SourceName ->
"Item Source"
fromList : List String -> List Field
fromList strings =

View File

@ -29,6 +29,8 @@ module Data.Icons exposing
, personIcon
, search
, searchIcon
, source
, sourceIcon
, tag
, tagIcon
, tags
@ -40,6 +42,16 @@ import Html exposing (Html, i)
import Html.Attributes exposing (class)
source : String
source =
"upload icon"
sourceIcon : String -> Html msg
sourceIcon classes =
i [ class (source ++ " " ++ classes) ] []
customFieldType : CustomFieldType -> String
customFieldType ftype =
case ftype of