mirror of
https://github.com/correl/planning-poker.git
synced 2024-11-14 19:19:30 +00:00
Clean up some UI values
This commit is contained in:
parent
22436d22f7
commit
e48900996b
3 changed files with 17 additions and 14 deletions
|
@ -84,9 +84,9 @@ layout model =
|
||||||
}
|
}
|
||||||
, el
|
, el
|
||||||
[ centerX
|
[ centerX
|
||||||
, Background.color UI.red
|
, Background.color UI.colors.errorBackground
|
||||||
, padding 20
|
, padding 20
|
||||||
, Font.color UI.white
|
, Font.color UI.colors.errorForeground
|
||||||
, transparent (model.error == Nothing)
|
, transparent (model.error == Nothing)
|
||||||
]
|
]
|
||||||
<|
|
<|
|
||||||
|
|
|
@ -212,20 +212,20 @@ viewRoom player room =
|
||||||
navBar : { title : String, playerName : String } -> Element Msg
|
navBar : { title : String, playerName : String } -> Element Msg
|
||||||
navBar { title, playerName } =
|
navBar { title, playerName } =
|
||||||
row
|
row
|
||||||
[ Background.color UI.blue
|
[ Background.color UI.colors.primary
|
||||||
, height (px 50)
|
, height (px 50)
|
||||||
, width fill
|
, width fill
|
||||||
, padding 10
|
, padding 10
|
||||||
]
|
]
|
||||||
[ el
|
[ el
|
||||||
[ Font.alignLeft
|
[ Font.alignLeft
|
||||||
, Font.color UI.white
|
, Font.color UI.colors.background
|
||||||
, width fill
|
, width fill
|
||||||
]
|
]
|
||||||
(text title)
|
(text title)
|
||||||
, el
|
, el
|
||||||
[ Font.alignRight
|
[ Font.alignRight
|
||||||
, Font.color UI.white
|
, Font.color UI.colors.background
|
||||||
]
|
]
|
||||||
(text playerName)
|
(text playerName)
|
||||||
]
|
]
|
||||||
|
@ -245,10 +245,10 @@ viewCards selected =
|
||||||
, Border.rounded 10
|
, Border.rounded 10
|
||||||
, Background.color <|
|
, Background.color <|
|
||||||
if selected == Just value then
|
if selected == Just value then
|
||||||
UI.blue
|
UI.colors.selected
|
||||||
|
|
||||||
else
|
else
|
||||||
UI.white
|
UI.colors.background
|
||||||
, Font.size 50
|
, Font.size 50
|
||||||
]
|
]
|
||||||
{ onPress = Just (Vote value)
|
{ onPress = Just (Vote value)
|
||||||
|
@ -278,7 +278,6 @@ viewPlayers playerList =
|
||||||
el
|
el
|
||||||
[ padding 10
|
[ padding 10
|
||||||
, Font.alignRight
|
, Font.alignRight
|
||||||
, Background.color UI.lightGrey
|
|
||||||
]
|
]
|
||||||
(text <| Maybe.withDefault " " player.vote)
|
(text <| Maybe.withDefault " " player.vote)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
module PlanningPokerUI exposing
|
module PlanningPokerUI exposing
|
||||||
( actionButton
|
( actionButton
|
||||||
, blue
|
|
||||||
, colors
|
, colors
|
||||||
, fontSizes
|
, fontSizes
|
||||||
, heroText
|
, heroText
|
||||||
, lightGrey
|
|
||||||
, red
|
|
||||||
, toDocument
|
, toDocument
|
||||||
, white
|
|
||||||
)
|
)
|
||||||
|
|
||||||
import Browser exposing (Document)
|
import Browser exposing (Document)
|
||||||
|
@ -26,7 +22,10 @@ colors =
|
||||||
, background = white
|
, background = white
|
||||||
, selected = primary
|
, selected = primary
|
||||||
, disabled = lightGrey
|
, disabled = lightGrey
|
||||||
, error = red
|
, errorBackground = red
|
||||||
|
, errorForeground = white
|
||||||
|
, text = black
|
||||||
|
, buttonText = white
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -56,6 +55,11 @@ white =
|
||||||
rgb255 255 255 255
|
rgb255 255 255 255
|
||||||
|
|
||||||
|
|
||||||
|
black : Color
|
||||||
|
black =
|
||||||
|
rgb255 0 0 0
|
||||||
|
|
||||||
|
|
||||||
actionButton :
|
actionButton :
|
||||||
List (Attribute msg)
|
List (Attribute msg)
|
||||||
-> { isActive : Bool, onPress : msg, label : Element msg }
|
-> { isActive : Bool, onPress : msg, label : Element msg }
|
||||||
|
@ -93,7 +97,7 @@ toDocument : { title : String, body : List (Element msg) } -> Document msg
|
||||||
toDocument { title, body } =
|
toDocument { title, body } =
|
||||||
{ title = title
|
{ title = title
|
||||||
, body =
|
, body =
|
||||||
[ layout [ explain Debug.todo ] <|
|
[ layout [] <|
|
||||||
column [ width fill, height fill, spacing 20 ] body
|
column [ width fill, height fill, spacing 20 ] body
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue