aboutsummaryrefslogtreecommitdiff
path: root/client/src
diff options
context:
space:
mode:
authorJasper Van der Jeugt2020-09-11 13:45:01 +0200
committerJasper Van der Jeugt2020-09-11 13:45:01 +0200
commit876c02475b526d3498fa28223ef85cc57e8591b9 (patch)
tree9b13baa5e07bb8e0c5adeb4e6abb66b50a9388aa /client/src
parenta2e8f0e2ba128908d2ff933f905e08579a60f494 (diff)
Improve help text
Diffstat (limited to 'client/src')
-rw-r--r--client/src/Client.elm23
1 files changed, 18 insertions, 5 deletions
diff --git a/client/src/Client.elm b/client/src/Client.elm
index 137ebbe..23949d3 100644
--- a/client/src/Client.elm
+++ b/client/src/Client.elm
@@ -149,9 +149,15 @@ viewTable : GameState -> Html Msg
viewTable game = case game.view.table of
Messages.Proposing c my -> Html.div [] <|
[ Html.p []
- [ Html.text <| "Select " ++
- pluralize (blackCardBlanks game.cards c) "card" "cards" ++
- " from your hand"
+ [ Html.text <|
+ if List.length my > 0 then
+ "Waiting for other players..."
+ else if List.length (selectedWhiteCards game) == blackCardBlanks game.cards c then
+ "Click 'Propose' to submit your proposal."
+ else
+ "Select " ++
+ pluralize (blackCardBlanks game.cards c) "card" "cards" ++
+ " from your hand."
]
, blackCard [] game.cards c <| selectedWhiteCards game
, Html.br [] []
@@ -171,7 +177,14 @@ viewTable game = case game.view.table of
[Html.text "Skip remaining players"]
]
Messages.Voting black proposals myProposal myVote -> Html.div [] <|
- [Html.p [] [Html.text <| "Vote for the funniest combination"]] ++
+ [ Html.p []
+ [ Html.text <| case myVote of
+ Just _ -> "Waiting for other players..."
+ Nothing -> case game.selectedVote of
+ Nothing -> "Vote for the funniest combination."
+ Just _ -> "Click 'Vote' to submit your vote."
+ ]
+ ] ++
List.indexedMap (\i proposal ->
let attrs =
if Just i == myProposal then
@@ -203,7 +216,7 @@ viewTable game = case game.view.table of
]
Messages.Tally black results -> Html.div [] <|
- [Html.p [] [Html.text "Vote results"]] ++
+ [Html.p [] [Html.text "Waiting for admin to start next round..."]] ++
List.map (\voted ->
if List.length voted.winners <= 0 then
blackCard [] game.cards black voted.proposal