diff options
author | Jasper Van der Jeugt | 2020-08-06 20:09:14 +0200 |
---|---|---|
committer | Jasper Van der Jeugt | 2020-08-06 20:09:14 +0200 |
commit | b8a5f115793a9f1b39c236e0862ead27b76cc92a (patch) | |
tree | 24ee04384d215aefda5a0e5f458dc7a553b16c3f /client/src/Messages.elm | |
parent | f57f7ff6ca1441cfabb921bdf7267012bae3b172 (diff) |
Skipping rounds
Diffstat (limited to 'client/src/Messages.elm')
-rw-r--r-- | client/src/Messages.elm | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/client/src/Messages.elm b/client/src/Messages.elm index fb244f9..02d2a37 100644 --- a/client/src/Messages.elm +++ b/client/src/Messages.elm @@ -183,7 +183,9 @@ type ClientMessage = ChangeMyName String | ProposeWhiteCards (List WhiteCard) | SubmitVote Int - | ConfirmTally + | AdminSkipProposals + | AdminSkipVotes + | AdminConfirmTally jsonDecClientMessage : Json.Decode.Decoder ( ClientMessage ) jsonDecClientMessage = @@ -191,7 +193,9 @@ jsonDecClientMessage = [ ("ChangeMyName", Json.Decode.lazy (\_ -> Json.Decode.map ChangeMyName (Json.Decode.string))) , ("ProposeWhiteCards", Json.Decode.lazy (\_ -> Json.Decode.map ProposeWhiteCards (Json.Decode.list (jsonDecWhiteCard)))) , ("SubmitVote", Json.Decode.lazy (\_ -> Json.Decode.map SubmitVote (Json.Decode.int))) - , ("ConfirmTally", Json.Decode.lazy (\_ -> Json.Decode.succeed ConfirmTally)) + , ("AdminSkipProposals", Json.Decode.lazy (\_ -> Json.Decode.succeed AdminSkipProposals)) + , ("AdminSkipVotes", Json.Decode.lazy (\_ -> Json.Decode.succeed AdminSkipVotes)) + , ("AdminConfirmTally", Json.Decode.lazy (\_ -> Json.Decode.succeed AdminConfirmTally)) ] in decodeSumObjectWithSingleField "ClientMessage" jsonDecDictClientMessage @@ -201,7 +205,9 @@ jsonEncClientMessage val = ChangeMyName v1 -> ("ChangeMyName", encodeValue (Json.Encode.string v1)) ProposeWhiteCards v1 -> ("ProposeWhiteCards", encodeValue ((Json.Encode.list jsonEncWhiteCard) v1)) SubmitVote v1 -> ("SubmitVote", encodeValue (Json.Encode.int v1)) - ConfirmTally -> ("ConfirmTally", encodeValue (Json.Encode.list identity [])) + AdminSkipProposals -> ("AdminSkipProposals", encodeValue (Json.Encode.list identity [])) + AdminSkipVotes -> ("AdminSkipVotes", encodeValue (Json.Encode.list identity [])) + AdminConfirmTally -> ("AdminConfirmTally", encodeValue (Json.Encode.list identity [])) in encodeSumObjectWithSingleField keyval val |