aboutsummaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2022-05-30 18:15:13 +0200
committer0neGal <mail@0negal.com>2022-05-30 18:15:13 +0200
commit6e7b66060e8655e013b74140b30f41f6d5ee52e8 (patch)
tree993ec8ae42e59f3f26fcc9b0537d45f306321fd4 /src/app
parent45bf3b862d45bd925380f9d5be68b823b6df4998 (diff)
downloadViper-6e7b66060e8655e013b74140b30f41f6d5ee52e8.tar.gz
Viper-6e7b66060e8655e013b74140b30f41f6d5ee52e8.zip
support for singular players
While it's unlikely we'll ever get down to 1 player, it's best to be on the safe side :p
Diffstat (limited to 'src/app')
-rw-r--r--src/app/launcher.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/app/launcher.js b/src/app/launcher.js
index 719048e..569d0fe 100644
--- a/src/app/launcher.js
+++ b/src/app/launcher.js
@@ -135,14 +135,14 @@ async function loadServers() {
if (servercount == 0 || ! servercount || ! playercount) {masterserver = false}
+ let playerstr = lang("gui.server.players");
+ if (playercount == 1) {
+ playerstr = lang("gui.server.player");
+ }
+
if (masterserver) {
serverstatus.classList.add("up");
- // servercount and playercount don't actually get set anywhere,
- // the reason for this is, while writing this code, the master
- // server is down so I don't have anyway to test the code...
- //
- // it'll be added whenever the masterserver comes online again.
- serverstatus.innerHTML = `${servercount} ${lang("gui.server.servers")} - ${playercount} ${lang("gui.server.players")}`;
+ serverstatus.innerHTML = `${servercount} ${lang("gui.server.servers")} - ${playercount} ${playerstr}`;
} else {
serverstatus.classList.add("down");
serverstatus.innerHTML = lang("gui.server.offline");