diff --git a/assets/js/mojang.js b/assets/js/mojang.js index 6638bba..ac4b6a0 100644 --- a/assets/js/mojang.js +++ b/assets/js/mojang.js @@ -1,9 +1,13 @@ const MOJANG_STATUS_BASE_CLASS = 'header-button header-button-group' +const MOJANG_SERVICE_NAMES = ['Auth', 'Sessions', 'API', 'Skins'] + export class MojangUpdater { updateStatus (services) { - for (const name of Object.keys(services)) { - this.updateServiceStatus(name, services[name]) + for (const name of MOJANG_SERVICE_NAMES) { + if (services[name]) { + this.updateServiceStatus(name, services[name]) + } } } diff --git a/assets/js/socket.js b/assets/js/socket.js index 256e9a0..369d436 100644 --- a/assets/js/socket.js +++ b/assets/js/socket.js @@ -15,7 +15,7 @@ export class SocketManager { webSocketProtocol = 'wss:' } - this._webSocket = new WebSocket(webSocketProtocol + '//' + location.host) + this._webSocket = new WebSocket(webSocketProtocol + '//' + location.hostname + ':8080') // The backend will automatically push data once connected this._webSocket.onopen = () => { diff --git a/config.json b/config.json index 3fd9359..0a11b03 100644 --- a/config.json +++ b/config.json @@ -9,6 +9,6 @@ "pingAll": 3000, "connectTimeout": 2500 }, - "logToDatabase": false, + "logToDatabase": true, "graphDuration": 86400000 } diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 624e480..52cb4a7 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,3 +1,6 @@ +**5.3.1** *(May 5 2020)* +- Fixes Mojang service status indicators not updating after initial page load. + **5.3.0** *(May 5 2020)* - Replaces socket.io library (and dependency) with vanilla WebSockets. - Frontend reconnect behavior has been improved to use exponential backoff behavior (up to 30 seconds) with unlimited retries. diff --git a/package-lock.json b/package-lock.json index 31d4acf..11cfe34 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "minetrack", - "version": "5.3.0", + "version": "5.3.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 07005f4..4560a96 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "minetrack", - "version": "5.3.0", + "version": "5.3.1", "description": "A Minecraft server tracker that lets you focus on the basics.", "main": "main.js", "dependencies": {