Browse Source

update server status behaviour

main
ghost 10 months ago
parent
commit
0dbe79af48
  1. 32
      templates/default/main/index.html.twig

32
templates/default/main/index.html.twig

@ -40,7 +40,9 @@ @@ -40,7 +40,9 @@
#{{ server.crc32server }}
{% endif %}
</td>
<td class="text-align-left">{{ server.info.Map }}</td>
<td class="text-align-left">
{{ server.info.Map }}
</td>
<td class="text-align-left">
<span title="{{ server.added | date('r') }}">
{{ server.added | format_ago }}
@ -48,12 +50,34 @@ @@ -48,12 +50,34 @@
</td>
<td class="text-align-left">
<span title="{{ server.online | date('r') }}">
{% if server.status %}
{{ 'now' | trans }}
{% else %}
{{ server.online | format_ago }}
{% endif %}
</span>
</td>
<td class="text-align-center">{{ server.connections }}{#{{ server.info.Players }}#}</td>
<td class="text-align-center">{{ server.info.MaxPlayers }}</td>
<td class="text-align-center">{{ server.info.Bots }}</td>
<td class="text-align-center">
{% if server.status %}
{{ server.connections }}{#{{ server.info.Players }}#}
{% else %}
-
{% endif %}
</td>
<td class="text-align-center">
{% if server.status %}
{{ server.info.MaxPlayers }}
{% else %}
-
{% endif %}
</td>
<td class="text-align-center">
{% if server.status %}
{{ server.info.Bots }}
{% else %}
-
{% endif %}
</td>
<td class="text-align-center">
<a href="{{ path('server_index', { crc32server : server.crc32server }) }}" title="{{ 'Stats' | trans }}"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="currentColor" viewBox="0 0 16 16">
<path d="M11 2a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v12h.5a.5.5 0 0 1 0 1H.5a.5.5 0 0 1 0-1H1v-3a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v3h1V7a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v7h1z"/>

Loading…
Cancel
Save