From 0dbe79af481a2d0cc37e4fdde192bceee79331f0 Mon Sep 17 00:00:00 2001 From: ghost Date: Thu, 18 Jan 2024 05:08:34 +0200 Subject: [PATCH] update server status behaviour --- templates/default/main/index.html.twig | 34 ++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/templates/default/main/index.html.twig b/templates/default/main/index.html.twig index fdc4ed5..576b599 100644 --- a/templates/default/main/index.html.twig +++ b/templates/default/main/index.html.twig @@ -40,7 +40,9 @@ #{{ server.crc32server }} {% endif %} - {{ server.info.Map }} + + {{ server.info.Map }} + {{ server.added | format_ago }} @@ -48,12 +50,34 @@ - {{ server.online | format_ago }} + {% if server.status %} + {{ 'now' | trans }} + {% else %} + {{ server.online | format_ago }} + {% endif %} - {{ server.connections }}{#{{ server.info.Players }}#} - {{ server.info.MaxPlayers }} - {{ server.info.Bots }} + + {% if server.status %} + {{ server.connections }}{#{{ server.info.Players }}#} + {% else %} + - + {% endif %} + + + {% if server.status %} + {{ server.info.MaxPlayers }} + {% else %} + - + {% endif %} + + + {% if server.status %} + {{ server.info.Bots }} + {% else %} + - + {% endif %} +