Add code to handle getting a player list from the server
This commit is contained in:
parent
6f36a47d77
commit
19618cb218
1 changed files with 8 additions and 3 deletions
|
|
@ -39,9 +39,14 @@ export default {
|
|||
},
|
||||
sockets: {
|
||||
PlayerListResponse(data) {
|
||||
if (data.success) {} else {
|
||||
this.$emit(`alert`)
|
||||
}
|
||||
if (data.success) {
|
||||
this.players = data.players;
|
||||
} else {
|
||||
this.$emit(`alert`, {
|
||||
message: data.message,
|
||||
classes: [`warning`],
|
||||
});
|
||||
};
|
||||
},
|
||||
PlayerJoin() {},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue