Add username display for the player.

This commit is contained in:
Oliver-Akins 2020-10-05 22:53:20 -06:00
parent fc5efdc118
commit 267395efe9

View file

@ -4,6 +4,8 @@
Secret Hitler Online
</h1>
<h2>
Username: {{ username }}
<br>
Game Code:
<code
v-clipboard="copy_game_code"
@ -31,11 +33,13 @@ export default {
data() {return {
game_code: ``,
is_host: false,
username: ``,
players: [],
}},
mounted() {
this.game_code = sessionStorage.getItem(`game-code`);
this.is_host = JSON.parse(sessionStorage.getItem(`is-host`));
this.username = sessionStorage.getItem(`user-name`);
this.$nextTick(() => this.getPlayerList());
},
methods: {