1.0.2-hotfix: Added matchlist new features.
This commit is contained in:
@@ -47,12 +47,35 @@
|
||||
<td class="px-6 py-4 whitespace-nowrap">
|
||||
<div class="flex items-center">
|
||||
<div class="flex-shrink-0 h-8 w-8">
|
||||
<img class="h-8 w-8 rounded-full" src="{{ p.avatar_url or 'https://via.placeholder.com/32' }}" alt="">
|
||||
{% if p.avatar_url %}
|
||||
<img class="h-8 w-8 rounded-full" src="{{ p.avatar_url }}" alt="">
|
||||
{% else %}
|
||||
<div class="h-8 w-8 rounded-full bg-yrtv-100 flex items-center justify-center text-yrtv-600 font-bold text-xs border border-yrtv-200">
|
||||
{{ (p.username or p.steam_id_64)[:2] | upper }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="ml-4">
|
||||
<a href="{{ url_for('players.detail', steam_id=p.steam_id_64) }}" class="text-sm font-medium text-gray-900 dark:text-white hover:text-yrtv-600">
|
||||
{{ p.username or p.steam_id_64 }}
|
||||
</a>
|
||||
<div class="flex items-center space-x-2">
|
||||
<a href="{{ url_for('players.detail', steam_id=p.steam_id_64) }}" class="text-sm font-medium text-gray-900 dark:text-white hover:text-yrtv-600">
|
||||
{{ p.username or p.steam_id_64 }}
|
||||
</a>
|
||||
{% if p.party_size > 1 %}
|
||||
{% set pc = p.party_size %}
|
||||
{% set p_color = 'bg-blue-100 text-blue-800' %}
|
||||
{% if pc == 2 %}{% set p_color = 'bg-indigo-100 text-indigo-800' %}
|
||||
{% elif pc == 3 %}{% set p_color = 'bg-blue-100 text-blue-800' %}
|
||||
{% elif pc == 4 %}{% set p_color = 'bg-purple-100 text-purple-800' %}
|
||||
{% elif pc >= 5 %}{% set p_color = 'bg-orange-100 text-orange-800' %}
|
||||
{% endif %}
|
||||
<span class="inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium {{ p_color }} dark:bg-opacity-20" title="Roster Party of {{ p.party_size }}">
|
||||
<svg class="mr-1 h-3 w-3" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path d="M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z" />
|
||||
</svg>
|
||||
{{ p.party_size }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@@ -97,12 +120,35 @@
|
||||
<td class="px-6 py-4 whitespace-nowrap">
|
||||
<div class="flex items-center">
|
||||
<div class="flex-shrink-0 h-8 w-8">
|
||||
<img class="h-8 w-8 rounded-full" src="{{ p.avatar_url or 'https://via.placeholder.com/32' }}" alt="">
|
||||
{% if p.avatar_url %}
|
||||
<img class="h-8 w-8 rounded-full" src="{{ p.avatar_url }}" alt="">
|
||||
{% else %}
|
||||
<div class="h-8 w-8 rounded-full bg-yrtv-100 flex items-center justify-center text-yrtv-600 font-bold text-xs border border-yrtv-200">
|
||||
{{ (p.username or p.steam_id_64)[:2] | upper }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="ml-4">
|
||||
<a href="{{ url_for('players.detail', steam_id=p.steam_id_64) }}" class="text-sm font-medium text-gray-900 dark:text-white hover:text-yrtv-600">
|
||||
{{ p.username or p.steam_id_64 }}
|
||||
</a>
|
||||
<div class="flex items-center space-x-2">
|
||||
<a href="{{ url_for('players.detail', steam_id=p.steam_id_64) }}" class="text-sm font-medium text-gray-900 dark:text-white hover:text-yrtv-600">
|
||||
{{ p.username or p.steam_id_64 }}
|
||||
</a>
|
||||
{% if p.party_size > 1 %}
|
||||
{% set pc = p.party_size %}
|
||||
{% set p_color = 'bg-blue-100 text-blue-800' %}
|
||||
{% if pc == 2 %}{% set p_color = 'bg-indigo-100 text-indigo-800' %}
|
||||
{% elif pc == 3 %}{% set p_color = 'bg-blue-100 text-blue-800' %}
|
||||
{% elif pc == 4 %}{% set p_color = 'bg-purple-100 text-purple-800' %}
|
||||
{% elif pc >= 5 %}{% set p_color = 'bg-orange-100 text-orange-800' %}
|
||||
{% endif %}
|
||||
<span class="inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium {{ p_color }} dark:bg-opacity-20" title="Roster Party of {{ p.party_size }}">
|
||||
<svg class="mr-1 h-3 w-3" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path d="M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z" />
|
||||
</svg>
|
||||
{{ p.party_size }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">时间</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">地图</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">比分</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">ELO</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Party</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">时长</th>
|
||||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">操作</th>
|
||||
</tr>
|
||||
@@ -31,13 +33,62 @@
|
||||
{{ match.map_name }}
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900 dark:text-white">
|
||||
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full {% if match.winner_team == 1 %}bg-green-100 text-green-800{% else %}bg-red-100 text-red-800{% endif %}">
|
||||
{{ match.score_team1 }}
|
||||
</span>
|
||||
-
|
||||
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full {% if match.winner_team == 2 %}bg-green-100 text-green-800{% else %}bg-red-100 text-red-800{% endif %}">
|
||||
{{ match.score_team2 }}
|
||||
</span>
|
||||
<div class="flex items-center space-x-2">
|
||||
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full {% if match.winner_team == 1 %}bg-green-100 text-green-800 border border-green-200{% else %}bg-gray-100 text-gray-500{% endif %}">
|
||||
{{ match.score_team1 }}
|
||||
{% if match.winner_team == 1 %}
|
||||
<svg class="ml-1 h-3 w-3" fill="currentColor" viewBox="0 0 20 20"><path d="M11.3 1.046A1 1 0 0112 2v5h4a1 1 0 01.82 1.573l-7 10A1 1 0 018 18v-5H4a1 1 0 01-.82-1.573l7-10a1 1 0 011.12-.38z" /></svg>
|
||||
{% endif %}
|
||||
</span>
|
||||
<span class="text-gray-400">-</span>
|
||||
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full {% if match.winner_team == 2 %}bg-green-100 text-green-800 border border-green-200{% else %}bg-gray-100 text-gray-500{% endif %}">
|
||||
{{ match.score_team2 }}
|
||||
{% if match.winner_team == 2 %}
|
||||
<svg class="ml-1 h-3 w-3" fill="currentColor" viewBox="0 0 20 20"><path d="M11.3 1.046A1 1 0 0112 2v5h4a1 1 0 01.82 1.573l-7 10A1 1 0 018 18v-5H4a1 1 0 01-.82-1.573l7-10a1 1 0 011.12-.38z" /></svg>
|
||||
{% endif %}
|
||||
</span>
|
||||
|
||||
<!-- Our Team Result Badge -->
|
||||
{% if match.our_result %}
|
||||
{% if match.our_result == 'win' %}
|
||||
<span class="ml-2 inline-flex items-center px-2 py-0.5 rounded text-xs font-bold bg-green-500 text-white">
|
||||
VICTORY
|
||||
</span>
|
||||
{% elif match.our_result == 'loss' %}
|
||||
<span class="ml-2 inline-flex items-center px-2 py-0.5 rounded text-xs font-bold bg-red-500 text-white">
|
||||
DEFEAT
|
||||
</span>
|
||||
{% elif match.our_result == 'mixed' %}
|
||||
<span class="ml-2 inline-flex items-center px-2 py-0.5 rounded text-xs font-bold bg-yellow-500 text-white">
|
||||
CIVIL WAR
|
||||
</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400">
|
||||
{% if match.avg_elo and match.avg_elo > 0 %}
|
||||
<span class="font-mono">{{ "%.0f"|format(match.avg_elo) }}</span>
|
||||
{% else %}
|
||||
<span class="text-xs text-gray-300">-</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400">
|
||||
{% if match.max_party and match.max_party > 1 %}
|
||||
{% set p = match.max_party %}
|
||||
{% set party_class = 'bg-gray-100 text-gray-800' %}
|
||||
{% if p == 2 %} {% set party_class = 'bg-indigo-100 text-indigo-800 border border-indigo-200' %}
|
||||
{% elif p == 3 %} {% set party_class = 'bg-blue-100 text-blue-800 border border-blue-200' %}
|
||||
{% elif p == 4 %} {% set party_class = 'bg-purple-100 text-purple-800 border border-purple-200' %}
|
||||
{% elif p >= 5 %} {% set party_class = 'bg-orange-100 text-orange-800 border border-orange-200' %}
|
||||
{% endif %}
|
||||
|
||||
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium {{ party_class }}">
|
||||
👥 {{ match.max_party }}
|
||||
</span>
|
||||
{% else %}
|
||||
<span class="text-xs text-gray-300">Solo</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400">
|
||||
{{ (match.duration / 60) | int }} min
|
||||
|
||||
Reference in New Issue
Block a user