Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
Merge pull request #67 from Doxoh/fix_server_list
Browse files Browse the repository at this point in the history
fix server list
  • Loading branch information
zziger authored Oct 20, 2023
2 parents 29d2857 + 2f21597 commit e4d8513
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/components/server/servers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<th class="optional">&nbsp;</th>
</thead>
<tbody>
<tr v-for="server in getServerList" :key="server.id" v-on:click="showServerInfo(server.id)">
<tr v-for="server in getServerList" :key="server.id" v-on:click="showServerInfo(server.publicId)">
<td>
<div class="serverName">{{ server.name }}</div>
<div class="serverTags optional">
Expand Down Expand Up @@ -120,7 +120,7 @@
serversInfo: {},
filter: {
orderBy: {
column: "players",
column: "playersCount",
orderDesc: -1
},
name: "",
Expand Down Expand Up @@ -186,9 +186,9 @@
clearInput() {
this.filter.name = "";
},
showServerInfo(id) {
showServerInfo(publicId) {
var server = this.servers.find(server => {
return server.id === id;
return server.publicId === publicId;
});
this.$refs.serverModal.open(server);
}
Expand Down Expand Up @@ -231,8 +231,8 @@
});
return this.servers.filter(server => {
if (!server.players && this.filter.empty) return false;
if ((server.players === server.maxPlayers) && this.filter.full) return false;
if (!server.playersCount && this.filter.empty) return false;
if ((server.playersCount === server.maxPlayersCount) && this.filter.full) return false;
if (server.passworded && this.filter.locked) return false;
if (!this.filter.name) return true;
Expand Down

0 comments on commit e4d8513

Please sign in to comment.