Browse Source

update server status behaviour

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

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

@ -40,7 +40,9 @@
#{{ server.crc32server }} #{{ server.crc32server }}
{% endif %} {% endif %}
</td> </td>
<td class="text-align-left">{{ server.info.Map }}</td> <td class="text-align-left">
{{ server.info.Map }}
</td>
<td class="text-align-left"> <td class="text-align-left">
<span title="{{ server.added | date('r') }}"> <span title="{{ server.added | date('r') }}">
{{ server.added | format_ago }} {{ server.added | format_ago }}
@ -48,12 +50,34 @@
</td> </td>
<td class="text-align-left"> <td class="text-align-left">
<span title="{{ server.online | date('r') }}"> <span title="{{ server.online | date('r') }}">
{{ server.online | format_ago }} {% if server.status %}
{{ 'now' | trans }}
{% else %}
{{ server.online | format_ago }}
{% endif %}
</span> </span>
</td> </td>
<td class="text-align-center">{{ server.connections }}{#{{ server.info.Players }}#}</td> <td class="text-align-center">
<td class="text-align-center">{{ server.info.MaxPlayers }}</td> {% if server.status %}
<td class="text-align-center">{{ server.info.Bots }}</td> {{ 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"> <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"> <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"/> <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