mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-05 22:55:58 +00:00
Show tags in item list view
Also set default page size down to 60.
This commit is contained in:
parent
1d2a6e6caa
commit
5b2b2eceb3
@ -1029,7 +1029,7 @@ moveAttachmentBefore flags itemId data receive =
|
||||
itemSearch : Flags -> ItemSearch -> (Result Http.Error ItemLightList -> msg) -> Cmd msg
|
||||
itemSearch flags search receive =
|
||||
Http2.authPost
|
||||
{ url = flags.config.baseUrl ++ "/api/v1/sec/item/search"
|
||||
{ url = flags.config.baseUrl ++ "/api/v1/sec/item/searchWithTags"
|
||||
, account = getAccount flags
|
||||
, body = Http.jsonBody (Api.Model.ItemSearch.encode search)
|
||||
, expect = Http.expectJson receive Api.Model.ItemLightList.decoder
|
||||
|
@ -162,7 +162,7 @@ viewItem item =
|
||||
, Util.String.underscoreToSpace item.name
|
||||
|> text
|
||||
]
|
||||
, span [ class "meta" ]
|
||||
, div [ class "meta" ]
|
||||
[ div
|
||||
[ classList
|
||||
[ ( "ui ribbon label", True )
|
||||
@ -173,9 +173,33 @@ viewItem item =
|
||||
[ i [ class "exclamation icon" ] []
|
||||
, text " New"
|
||||
]
|
||||
, span
|
||||
[ classList
|
||||
[ ( "right floated", not isConfirmed )
|
||||
]
|
||||
]
|
||||
[ Util.Time.formatDate item.date |> text
|
||||
]
|
||||
]
|
||||
, span [ class "right floated meta" ]
|
||||
[ Util.Time.formatDate item.date |> text
|
||||
, div [ class "meta description" ]
|
||||
[ div
|
||||
[ classList
|
||||
[ ( "ui right floated tiny labels", True )
|
||||
, ( "invisible hidden", item.tags == [] )
|
||||
]
|
||||
]
|
||||
(List.map
|
||||
(\tag ->
|
||||
div
|
||||
[ classList
|
||||
[ ( "ui basic label", True )
|
||||
, ( "blue", tag.category /= Nothing )
|
||||
]
|
||||
]
|
||||
[ text tag.name ]
|
||||
)
|
||||
item.tags
|
||||
)
|
||||
]
|
||||
]
|
||||
, div [ class "content" ]
|
||||
|
@ -36,7 +36,7 @@ type alias UiSettings =
|
||||
|
||||
defaults : UiSettings
|
||||
defaults =
|
||||
{ itemSearchPageSize = 90
|
||||
{ itemSearchPageSize = 60
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user