Add a primitive player list, this will show the player name and their role
This commit is contained in:
parent
b668f0c211
commit
7273db2ede
1 changed files with 50 additions and 6 deletions
|
|
@ -1,17 +1,61 @@
|
|||
<template>
|
||||
<div></div>
|
||||
<div id="player_list" class="centre">
|
||||
<h2>Players:</h2>
|
||||
<div
|
||||
v-for="player in players"
|
||||
:key="player.name"
|
||||
>
|
||||
{{ player.name }}
|
||||
<span v-if="player.role" class="player-role">
|
||||
( {{ player.role }} )
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: ``,
|
||||
name: `PlayerList`,
|
||||
components: {},
|
||||
computed: {},
|
||||
computed: {
|
||||
isHost() {
|
||||
return false;
|
||||
},
|
||||
players() {
|
||||
return [
|
||||
{
|
||||
name: `Oliver`,
|
||||
role: `Developer`
|
||||
},
|
||||
{
|
||||
name: `Max`,
|
||||
role: `Designer`
|
||||
},
|
||||
{
|
||||
name: `Ray`,
|
||||
}
|
||||
]
|
||||
//return this.$store.state.players;
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
sockets: {
|
||||
NewPlayer() {},
|
||||
PlayerUpdate() {},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import "css/theme.css";
|
||||
@import "css/style.css";
|
||||
<style scoped>
|
||||
@import "../css/theme.css";
|
||||
@import "../css/style.css";
|
||||
|
||||
#player_list {
|
||||
background-color: var(--background2);
|
||||
color: var(--background2-text);
|
||||
padding: 0 15px 15px;
|
||||
border-radius: 20px;
|
||||
margin: 5px 10px;
|
||||
width: 15%;
|
||||
}
|
||||
</style>
|
||||
Loading…
Add table
Add a link
Reference in a new issue