online indicators

This commit is contained in:
2026-04-21 22:55:48 +03:00
parent db78568340
commit af327ec142
2 changed files with 42 additions and 2 deletions

View File

@@ -67,7 +67,22 @@
{% for p in players %}
<a href="/player/{{ p.player_id }}" class="player-card">
<strong>{{ p.player }}</strong> <span>(ID: {{ p.player_id }})</span>
<div style="display: flex; justify-content: space-between; align-items: center;">
<div>
<strong>{{ p.player }}</strong> <span>(ID: {{ p.player_id }})</span>
</div>
{% if p.is_online %}
<span style="display: flex; align-items: center; gap: 6px; background: rgba(50, 150, 50, 0.2); padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; color: #7bcc7b; font-weight: bold; border: 1px solid rgba(123, 204, 123, 0.3);">
<span style="display: inline-block; width: 8px; height: 8px; background: #7bcc7b; border-radius: 50%; box-shadow: 0 0 6px #7bcc7b;"></span>
Online
</span>
{% else %}
<span style="display: flex; align-items: center; gap: 6px; background: rgba(150, 50, 50, 0.2); padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; color: #cc7b7b; font-weight: bold; border: 1px solid rgba(204, 123, 123, 0.3);">
<span style="display: inline-block; width: 8px; height: 8px; background: #cc7b7b; border-radius: 50%;"></span>
Offline
</span>
{% endif %}
</div>
</a>
{% endfor %}
</div>