From 6fd5fdb7fe5cf74142477f7ba83767ac9011769d Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 30 Dec 2023 22:43:38 +0000 Subject: [PATCH] use assets from the vanilla repo --- assets/html/index.html | 22 +++++++++++----------- assets/images/logo.svg | 20 ++++++++------------ assets/js/servers.js | 10 +++++----- assets/js/socket.js | 10 +++++----- assets/js/sort.js | 4 ++-- assets/js/util.js | 2 +- 6 files changed, 32 insertions(+), 36 deletions(-) diff --git a/assets/html/index.html b/assets/html/index.html index 2744e64..83d35e0 100644 --- a/assets/html/index.html +++ b/assets/html/index.html @@ -14,7 +14,7 @@ - Tracker + Minetrack @@ -24,8 +24,8 @@
-

FounderConnessi

-
Connessione...
+

Minetrack

+
Connecting...
@@ -35,14 +35,14 @@
-

FounderConnessi

-

Conta 0 giocatori su 0 server membri.

+

Minetrack

+

Counting 0 players on 0 Minecraft servers.

-
Ordina per
...
+
Sort By
...
-
Impostazioni grafico
+
Graph Controls
@@ -53,9 +53,9 @@
- Mostra tutti - Nascondi tutti - Solo i preferiti + Show All + Hide All + Only Favorites
@@ -65,7 +65,7 @@ diff --git a/assets/images/logo.svg b/assets/images/logo.svg index 6a0c210..022bcce 100644 --- a/assets/images/logo.svg +++ b/assets/images/logo.svg @@ -1,12 +1,8 @@ - - - - - - - - - - - - + + + + + + + + \ No newline at end of file diff --git a/assets/js/servers.js b/assets/js/servers.js index dd1e5d1..27cb0cd 100644 --- a/assets/js/servers.js +++ b/assets/js/servers.js @@ -91,7 +91,7 @@ export class ServerRegistration { if (typeof playerCount !== 'number') { this._app.tooltip.hide() } else { - this._app.tooltip.set(pos.left, pos.top, 10, 10, `${formatNumber(playerCount)} giocatori
${formatTimestampSeconds(this._graphData[0][id])}`) + this._app.tooltip.set(pos.left, pos.top, 10, 10, `${formatNumber(playerCount)} Players
${formatTimestampSeconds(this._graphData[0][id])}`) } } else { this._app.tooltip.hide() @@ -229,7 +229,7 @@ export class ServerRegistration { this._renderValue('record', (element) => { if (ping.recordData.timestamp > 0) { element.innerText = `${formatNumber(ping.recordData.playerCount)} (${formatDate(ping.recordData.timestamp)})` - element.title = `Il ${formatDate(ping.recordData.timestamp)} ${formatTimestampSeconds(ping.recordData.timestamp)}` + element.title = `At ${formatDate(ping.recordData.timestamp)} ${formatTimestampSeconds(ping.recordData.timestamp)}` } else { element.innerText = formatNumber(ping.recordData.playerCount) } @@ -255,7 +255,7 @@ export class ServerRegistration { // If the frontend has freshly connection, and the server's last ping was in error, it may not contain an error object // In this case playerCount will safely be null, so provide a generic error message instead - this._renderValue('error', 'Fallito il ping') + this._renderValue('error', 'Failed to ping') } else if (typeof ping.playerCount === 'number') { this._hideValue('error') this._renderValue('player-count', formatNumber(ping.playerCount)) @@ -284,8 +284,8 @@ export class ServerRegistration {

${this.data.name}

- Giocatori: - Picco di ${this._app.publicConfig.graphDurationLabel}: - + Players: + ${this._app.publicConfig.graphDurationLabel} Peak: - Record: -
diff --git a/assets/js/socket.js b/assets/js/socket.js index 47a8b91..d8434e3 100644 --- a/assets/js/socket.js +++ b/assets/js/socket.js @@ -19,7 +19,7 @@ export class SocketManager { // The backend will automatically push data once connected this._webSocket.onopen = () => { - this._app.caption.set('Caricamento...') + this._app.caption.set('Loading...') // Reset reconnection scheduling since the WebSocket has been established this._reconnectDelayBase = 0 @@ -33,9 +33,9 @@ export class SocketManager { // See https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent // Treat other codes as active errors (besides connectivity errors) when displaying the message if (event.code === 1006) { - this._app.caption.set('Connessione persa!') + this._app.caption.set('Lost connection!') } else { - this._app.caption.set('Disconnesso per un errore.') + this._app.caption.set('Disconnected due to error.') } // Schedule socket reconnection attempt @@ -152,14 +152,14 @@ export class SocketManager { clearInterval(reconnectInterval) // Update displayed text - this._app.caption.set('Riconnessione...') + this._app.caption.set('Reconnecting...') // Attempt reconnection // Only attempt when reconnectDelaySeconds === 0 and not <= 0, otherwise multiple attempts may be started this.createWebSocket() } else if (this._reconnectDelaySeconds > 0) { // Update displayed text - this._app.caption.set(`Riconnessione in ${this._reconnectDelaySeconds}s...`) + this._app.caption.set(`Reconnecting in ${this._reconnectDelaySeconds}s...`) } }, 1000) } diff --git a/assets/js/sort.js b/assets/js/sort.js index ab52b04..34e1533 100644 --- a/assets/js/sort.js +++ b/assets/js/sort.js @@ -1,12 +1,12 @@ const SORT_OPTIONS = [ { - getName: () => 'Giocatori', + getName: () => 'Players', sortFunc: (a, b) => b.playerCount - a.playerCount, highlightedValue: 'player-count' }, { getName: (app) => { - return `Picco di ${app.publicConfig.graphDurationLabel}` + return `${app.publicConfig.graphDurationLabel} Peak` }, sortFunc: (a, b) => { if (!a.lastPeakData && !b.lastPeakData) { diff --git a/assets/js/util.js b/assets/js/util.js index 8e77880..398bcd1 100644 --- a/assets/js/util.js +++ b/assets/js/util.js @@ -107,7 +107,7 @@ export function formatTimestampSeconds (secs) { export function formatDate (secs) { const date = new Date(0) date.setUTCSeconds(secs) - return date.toLocaleDateString('it-IT') + return date.toLocaleDateString() } export function formatPercent (x, over) {