From 6157ed60b865ccb1f82742d86019fa08733f63b1 Mon Sep 17 00:00:00 2001 From: Silversthorn Date: Sat, 3 Aug 2024 21:39:17 +0200 Subject: [PATCH] trying to rework server players --- .../templates/panel/parts/details_stats.html | 17 +- .../templates/panel/parts/server_players.html | 178 ++++++++---------- app/frontend/templates/public/status.html | 2 +- 3 files changed, 94 insertions(+), 103 deletions(-) diff --git a/app/frontend/templates/panel/parts/details_stats.html b/app/frontend/templates/panel/parts/details_stats.html index ab89f01d..3e02d85d 100644 --- a/app/frontend/templates/panel/parts/details_stats.html +++ b/app/frontend/templates/panel/parts/details_stats.html @@ -212,16 +212,23 @@ let players = server.players_cache; for (let i = 0; i < players.length; i++) { text += ``; - text += `${players[i]["name"]}`; + text += `${players[i]["name"]}`; if (players[i]["status"] === "Online") { - text += ` ${players[i]['status']}` + text += ` ${players[i]['status']}` } else { - text += ` ${players[i]['status']} Last connection :
${players[i]['last_seen']}
` + text += ` ${players[i]['status']} Last connection :
${players[i]['last_seen']}
` } if (server["running"]) { - text += `


` + text += ` +
+
+
+
+
+
+ ` } else { - text += ` Unavailable
(Server Offline)
` + text += `
Unavailable
(Server Offline)
` } } diff --git a/app/frontend/templates/panel/parts/server_players.html b/app/frontend/templates/panel/parts/server_players.html index 852420e4..ebf79d13 100644 --- a/app/frontend/templates/panel/parts/server_players.html +++ b/app/frontend/templates/panel/parts/server_players.html @@ -1,103 +1,87 @@

{{ translate('serverPlayerManagement', 'players', data['lang']) }}:

- - - - - - - - - - {% for player in data['cached_players'] %} - - - {% if player['status'] == 'Online' %} - - {% elif player['status'] == 'Offline' %} - - {% end %} - + + {% end %} + +
PlayerStatusActions
- {{ player['name'] }} - {{ player['status'] }} {{ player['status'] }} Last connection :
{{ player['last_seen'] }}
- {% if data['server_stats']['running'] %} - -
- -
- -
- - {% else %} - Unavailable
(Server Offline)
+
+ + + + + + + + + + {% for player in data['cached_players'] %} + + + {% if player['status'] == 'Online' %} + + {% elif player['status'] == 'Offline' %} + {% end %} - - - {% end %} - -
PlayerStatusActions
+ {{ player['name'] }} + {{ player['status'] }} {{ player['status'] }} Last connection :
{{ player['last_seen'] }}
+
+ {% if data['server_stats']['running'] %} +
+
+
+
+
+
+ {% else %} + Unavailable
(Server Offline)
+ {% end %} +
+
- -
+

{{ translate('serverPlayerManagement', 'bannedPlayers', data['lang']) }}:

- - - - - - - - - - - {% for player in data['banned_players'] %} - - - - - - - {% end %} - -
PlayerStatusReasonActions
{{ player['name'] }}Banned on {{ player['banned_on'] }}Banned by : {{ player['source'] }}
Reason : {{ player['reason'] }}
- -
- - - - - - - - - {% for player in data['banned_players'] %} - - - - - {% end %} - -
PlayerActions
{{ player['name'] }} - -
+
+ + + + + + + + + + + {% for player in data['banned_players'] %} + + + + + + + {% end %} + +
PlayerStatusReasonActions
{{ player['name'] }}Banned on {{ player['banned_on'] }}Banned by : {{ player['source'] }}
Reason : {{ player['reason'] }}
+ +
+
+
+ + + + + + + + + {% for player in data['banned_players'] %} + + + + + {% end %} + +
PlayerActions
{{ player['name'] }} + +
+
\ No newline at end of file diff --git a/app/frontend/templates/public/status.html b/app/frontend/templates/public/status.html index 5f8f02ef..8a26250a 100644 --- a/app/frontend/templates/public/status.html +++ b/app/frontend/templates/public/status.html @@ -9,7 +9,7 @@