From 876c02475b526d3498fa28223ef85cc57e8591b9 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Fri, 11 Sep 2020 13:45:01 +0200 Subject: Improve help text --- client/src/Client.elm | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'client') 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 -- cgit v1.2.3