Add username display for the player.
This commit is contained in:
parent
fc5efdc118
commit
267395efe9
1 changed files with 4 additions and 0 deletions
|
|
@ -4,6 +4,8 @@
|
||||||
Secret Hitler Online
|
Secret Hitler Online
|
||||||
</h1>
|
</h1>
|
||||||
<h2>
|
<h2>
|
||||||
|
Username: {{ username }}
|
||||||
|
<br>
|
||||||
Game Code:
|
Game Code:
|
||||||
<code
|
<code
|
||||||
v-clipboard="copy_game_code"
|
v-clipboard="copy_game_code"
|
||||||
|
|
@ -31,11 +33,13 @@ export default {
|
||||||
data() {return {
|
data() {return {
|
||||||
game_code: ``,
|
game_code: ``,
|
||||||
is_host: false,
|
is_host: false,
|
||||||
|
username: ``,
|
||||||
players: [],
|
players: [],
|
||||||
}},
|
}},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.game_code = sessionStorage.getItem(`game-code`);
|
this.game_code = sessionStorage.getItem(`game-code`);
|
||||||
this.is_host = JSON.parse(sessionStorage.getItem(`is-host`));
|
this.is_host = JSON.parse(sessionStorage.getItem(`is-host`));
|
||||||
|
this.username = sessionStorage.getItem(`user-name`);
|
||||||
this.$nextTick(() => this.getPlayerList());
|
this.$nextTick(() => this.getPlayerList());
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue