From 810ea4f67754645b7d19de8d76ae3dbcfe385b5f Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 19 Sep 2020 17:13:09 -0600 Subject: [PATCH] Add methods for joining a game. --- src/components/GameCode.vue | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/components/GameCode.vue b/src/components/GameCode.vue index 4d2b0a1..f6ccf27 100644 --- a/src/components/GameCode.vue +++ b/src/components/GameCode.vue @@ -10,15 +10,24 @@ id="username" name="User Name" v-model="username" + @keyup.enter.stop="$refs.gamecode.focus()" >
+
+ @@ -31,7 +40,14 @@ export default { game_code: ``, username: ``, }}, - methods: {}, + methods: { + try_game_code() { + if (this.game_code.length > 0) { + alert('The game code you have entered is invalid.'); + this.game_code = ``; + } + }, + }, }