mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-21 02:17:20 +02:00
55 lines
1.4 KiB
Plaintext
55 lines
1.4 KiB
Plaintext
@inherits PlayerInfoTanksListBase;
|
|
@if (TanksList != null && TanksList.Count() > 0)
|
|
{
|
|
<div class="filters">
|
|
<div @onclick="@(e => OnFilterClick(e, TanksSorting.LastBattle))">
|
|
<img class="filter-button" src="/icons/calendar.scale-200.png" />
|
|
</div>
|
|
<div @onclick="@(e => OnFilterClick(e, TanksSorting.Winrate))">
|
|
<img class="filter-button" src="/icons/details.wins.scale-200.png" />
|
|
</div>
|
|
<div @onclick="@(e => OnFilterClick(e, TanksSorting.Battles))">
|
|
<img class="filter-button" src="/icons/details.battles.scale-200.png" />
|
|
</div>
|
|
</div>
|
|
@sorting <span>ascending: @isSortAscending</span>
|
|
|
|
<div class="tanks-list">
|
|
@foreach (var tank in TanksList)
|
|
{
|
|
<TankListItem Tank=@tank></TankListItem>
|
|
}
|
|
</div>
|
|
}
|
|
|
|
|
|
@code {
|
|
|
|
private enum TanksSorting
|
|
{
|
|
LastBattle,
|
|
Winrate,
|
|
Battles,
|
|
Damage,
|
|
Wn7,
|
|
Tier
|
|
}
|
|
|
|
private TanksSorting sorting = TanksSorting.LastBattle;
|
|
|
|
private bool isSortAscending = false;
|
|
|
|
private void OnFilterClick(MouseEventArgs e, TanksSorting sortingToApply)
|
|
{
|
|
if (sortingToApply != sorting)
|
|
{
|
|
sorting = sortingToApply;
|
|
isSortAscending = false;
|
|
}
|
|
else
|
|
{
|
|
isSortAscending = !isSortAscending;
|
|
}
|
|
}
|
|
}
|