1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2026-01-25 12:35:55 +00:00

ui: Add search clear button

This commit is contained in:
James Hillyerd
2019-02-24 08:42:33 -08:00
parent fc95f6e57f
commit 71b3de59af
3 changed files with 17 additions and 3 deletions

View File

@@ -12,6 +12,7 @@ import Html.Attributes
( alt
, class
, classList
, disabled
, download
, href
, id
@@ -500,12 +501,18 @@ view model =
[ div [ class ("mailbox " ++ mode) ]
[ aside [ class "message-list-controls" ]
[ input
[ type_ "search"
[ type_ "text"
, placeholder "search"
, Events.onInput OnSearchInput
, value model.searchInput
]
[]
, button
[ Events.onClick (OnSearchInput "")
, disabled (model.searchInput == "")
, alt "Clear Search"
]
[ i [ class "fas fa-times" ] [] ]
, button
[ Events.onClick PurgeMailboxPrompt
, alt "Purge Mailbox"