many styling tweaks, adds sourceName field
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
module Wealth exposing (Model, Msg(..), editValue, init, update, view)
|
||||
|
||||
import Api.Player exposing (Wealth)
|
||||
import Bulma as B
|
||||
import Html exposing (..)
|
||||
import Html.Attributes exposing (..)
|
||||
import Html.Events exposing (..)
|
||||
@@ -22,13 +23,22 @@ view wealth model =
|
||||
:: (case model of
|
||||
View ->
|
||||
viewWealth wealth
|
||||
++ [ div [ class "level-item button is-small is-dark" ]
|
||||
[ span
|
||||
[ class "icon is-small"
|
||||
, onClick StartEdit
|
||||
]
|
||||
[ i [ class "fas fa-tools" ] [] ]
|
||||
]
|
||||
]
|
||||
|
||||
Edit amount ->
|
||||
viewUpdateWealth amount
|
||||
)
|
||||
++ [ div [ class "level-item" ]
|
||||
[ span [ class "icon", onClick StartEdit ] [ i [ class "fas fa-tools" ] [] ] ]
|
||||
]
|
||||
|
||||
|
||||
inBarButton =
|
||||
class "button is-small is-outlined "
|
||||
|
||||
|
||||
viewUpdateWealth amount =
|
||||
@@ -40,12 +50,26 @@ viewUpdateWealth amount =
|
||||
, ( "is-success", isValid amount )
|
||||
]
|
||||
, value amount
|
||||
, placeholder "En pièces d'or..."
|
||||
, style "width" "8em"
|
||||
, onInput AmountChanged
|
||||
]
|
||||
[]
|
||||
, button [ class "level-item button", onClick ConfirmEdit ] [ text "Ok" ]
|
||||
, button
|
||||
[ inBarButton
|
||||
, class "level-item is-primary"
|
||||
, onClick ConfirmEdit
|
||||
]
|
||||
[ B.icon
|
||||
{ icon =
|
||||
if isValid amount then
|
||||
"fas fa-check"
|
||||
|
||||
else
|
||||
"fas fa-times"
|
||||
, ratio = Nothing
|
||||
, size = Nothing
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user