mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-02 13:32:51 +00:00
More ui tweaks to item list
This commit is contained in:
parent
62111e5f93
commit
98f202b797
@ -109,23 +109,37 @@ viewItem item =
|
||||
dueDate =
|
||||
Maybe.map Util.Time.formatDateShort item.dueDate
|
||||
|> Maybe.withDefault ""
|
||||
|
||||
isConfirmed =
|
||||
item.state /= "created"
|
||||
|
||||
newColor =
|
||||
"blue"
|
||||
in
|
||||
div [ class "column item-list" ]
|
||||
[ a
|
||||
[ class "ui fluid card"
|
||||
[ classList
|
||||
[ ( "ui fluid card", True )
|
||||
, ( newColor, not isConfirmed )
|
||||
]
|
||||
, href "#"
|
||||
, onClick (SelectItem item)
|
||||
]
|
||||
[ div [ class "content" ]
|
||||
[ div [ class "header" ]
|
||||
[ div
|
||||
[ class "header"
|
||||
, Data.Direction.labelFromMaybe item.direction
|
||||
|> title
|
||||
]
|
||||
[ dirIcon
|
||||
, Util.String.ellipsis 45 item.name |> text
|
||||
]
|
||||
, span [ class "meta" ]
|
||||
[ div
|
||||
[ classList
|
||||
[ ( "ui blue ribbon label", True )
|
||||
, ( "invisible", item.state /= "created" )
|
||||
[ ( "ui ribbon label", True )
|
||||
, ( newColor, True )
|
||||
, ( "invisible", isConfirmed )
|
||||
]
|
||||
]
|
||||
[ i [ class "exclamation icon" ] []
|
||||
|
@ -5,6 +5,7 @@ module Data.Direction exposing
|
||||
, icon
|
||||
, iconFromMaybe
|
||||
, iconFromString
|
||||
, labelFromMaybe
|
||||
, toString
|
||||
)
|
||||
|
||||
@ -70,3 +71,10 @@ iconFromMaybe : Maybe String -> String
|
||||
iconFromMaybe ms =
|
||||
Maybe.map iconFromString ms
|
||||
|> Maybe.withDefault unknownIcon
|
||||
|
||||
|
||||
labelFromMaybe : Maybe String -> String
|
||||
labelFromMaybe ms =
|
||||
Maybe.andThen fromString ms
|
||||
|> Maybe.map toString
|
||||
|> Maybe.withDefault "Direction"
|
||||
|
@ -25,6 +25,7 @@ view model =
|
||||
[ class "item"
|
||||
, href "#"
|
||||
, onClick ToggleSearchMenu
|
||||
, title "Hide menu"
|
||||
]
|
||||
[ i [ class "ui angle down icon" ] []
|
||||
, text "Search"
|
||||
@ -33,6 +34,7 @@ view model =
|
||||
[ a
|
||||
[ class "icon item"
|
||||
, onClick ResetSearch
|
||||
, title "Reset form"
|
||||
, href "#"
|
||||
]
|
||||
[ i [ class "undo icon" ] []
|
||||
@ -40,6 +42,7 @@ view model =
|
||||
, a
|
||||
[ class "icon item"
|
||||
, onClick DoSearch
|
||||
, title "Run search query"
|
||||
, href ""
|
||||
]
|
||||
[ i [ class "ui search icon" ] []
|
||||
|
@ -133,8 +133,8 @@ textarea.markdown-editor {
|
||||
}
|
||||
|
||||
.default-layout .ui.grid > .column.item-list:not(.row) {
|
||||
padding-top: 0.3em;
|
||||
padding-bottom: 0.6em;
|
||||
padding-top: 0.8em;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.default-layout .ui.grid > .column.item-list:not(.row):last-child {
|
||||
padding-bottom: 1.5rem;
|
||||
|
Loading…
x
Reference in New Issue
Block a user