Skip to content

Commit

Permalink
Wip stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Mar 31, 2020
1 parent ce6d110 commit 4a7164a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion webgame_client/src/utils.rs
Expand Up @@ -3,6 +3,6 @@ pub fn format_join_code(code: &str) -> String {
if code.len() > 3 {
format!("{}-{}", &code[..3], &code[3..])
} else {
code.to_string()
code
}
}
7 changes: 7 additions & 0 deletions webgame_client/src/views/game.rs
Expand Up @@ -162,6 +162,13 @@ impl Component for GamePage {
oninput=self.link.callback(|e: InputData| Msg::SetChatLine(e.value)) />
<button class="primary" onclick=self.link.callback(|_| Msg::SendChat)>{"Send"}</button>
</div>
<div class="toolbar">
<button>{"Red Team"}</button>
<button>{"Blue Team"}</button>
<button>{"Become Spymaster"}</button>
<button>{"Become Operative"}</button>
<button>{"Shuffle Board"}</button>
</div>
</div>
}
}
Expand Down
4 changes: 2 additions & 2 deletions webgame_client/src/views/menu.rs
Expand Up @@ -86,8 +86,8 @@ impl Component for MenuPage {
<div class="toolbar">
<button onclick=self.link.callback(|_| Msg::NewGame)>{"New Game"}</button>
<input value=&self.join_code
size="8"
placeholder="JOINCODE"
size="7"
placeholder="JOINCOD"
onkeypress=self.link.callback(|event: KeyboardEvent| {
dbg!(event.key());
if event.key() == "Enter" {
Expand Down

0 comments on commit 4a7164a

Please sign in to comment.