new: usr: add more stats and a dialog for the recent battle that can be shareable #4
This commit is contained in:
@@ -38,6 +38,26 @@
|
||||
<span class="profile-stat__value">{{ stats.losses }}</span>
|
||||
<span class="profile-stat__label">Defeats</span>
|
||||
</div>
|
||||
<div class="profile-stat profile-stat--draw">
|
||||
<i class="fa fa-minus profile-stat__icon"></i>
|
||||
<span class="profile-stat__value">{{ stats.draws }}</span>
|
||||
<span class="profile-stat__label">Draws</span>
|
||||
</div>
|
||||
<div class="profile-stat profile-stat--rate">
|
||||
<i class="fa fa-percent profile-stat__icon"></i>
|
||||
<span class="profile-stat__value">{{ stats.winRate }}<small>%</small></span>
|
||||
<span class="profile-stat__label">Win rate</span>
|
||||
</div>
|
||||
<div class="profile-stat profile-stat--avg">
|
||||
<i class="fa fa-line-chart profile-stat__icon"></i>
|
||||
<span class="profile-stat__value">{{ stats.avgScore }}</span>
|
||||
<span class="profile-stat__label">Avg score</span>
|
||||
</div>
|
||||
<div class="profile-stat profile-stat--best">
|
||||
<i class="fa fa-star profile-stat__icon"></i>
|
||||
<span class="profile-stat__value">{{ stats.bestScore }}</span>
|
||||
<span class="profile-stat__label">Best score</span>
|
||||
</div>
|
||||
<div class="profile-stat profile-stat--bomb">
|
||||
<i class="fa fa-bomb profile-stat__icon"></i>
|
||||
<span class="profile-stat__value">{{ stats.bombs }}</span>
|
||||
@@ -45,6 +65,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if stats.total > 0 %}
|
||||
<div id="profile-charts-root" data-chart-data="{{ chartData|json_encode|e('html') }}"></div>
|
||||
{% endif %}
|
||||
|
||||
<div id="profile-battle-root" data-games="{{ gamesData|json_encode|e('html') }}"></div>
|
||||
|
||||
{% if recent|length > 0 %}
|
||||
<div class="profile-section">
|
||||
<h2 class="profile-section__title">
|
||||
@@ -71,7 +97,7 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<div class="profile-game profile-game--{{ result }}">
|
||||
<div class="profile-game profile-game--{{ result }}" data-game-index="{{ loop.index0 }}">
|
||||
<span class="profile-game__badge">
|
||||
{{ result == 'win' ? 'W' : (result == 'loss' ? 'L' : 'D') }}
|
||||
</span>
|
||||
@@ -106,3 +132,8 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
{{ vite_entry_script_tags('profile') }}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user