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: {
|
sockets: {
|
||||||
PlayerListResponse(data) {
|
PlayerListResponse(data) {
|
||||||
if (data.success) {} else {
|
if (data.success) {
|
||||||
this.$emit(`alert`)
|
this.players = data.players;
|
||||||
}
|
} else {
|
||||||
|
this.$emit(`alert`, {
|
||||||
|
message: data.message,
|
||||||
|
classes: [`warning`],
|
||||||
|
});
|
||||||
|
};
|
||||||
},
|
},
|
||||||
PlayerJoin() {},
|
PlayerJoin() {},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue