mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-27 20:30:07 +01:00
feat: simple player layout
This commit is contained in:
1 parent
08946996a5
commit
df29327231
6 files changed
+91
-8
No files matched your search
@@ -1,6 +1,58 @@
|
||||
@AccountInfo.WinRate %
|
||||
@using WotBlitzStatisticsPro.Blazor.Helpers
|
||||
@inject IStringLocalizer<App> Localize;
|
||||
|
||||
<RadzenCard>
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-lg-6">
|
||||
<table class="table" width="250px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>@Localize["Battles"]:</td>
|
||||
<td><b>@AccountInfo.Battles.ToString("N0")</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>@Localize["Win rate"]:</td>
|
||||
<td>
|
||||
<b>@AccountInfo.WinRate.ToString("N2")%</b>
|
||||
<div style="background-color: @AccountInfo.WinRate.ScaleColor(); width: 100%; height: 5px; margin-left: 2px; margin-right: 2px;"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>@Localize["Wn7"]:</td>
|
||||
<td>
|
||||
<b>@AccountInfo.Wn7.ToString("N2")</b>
|
||||
<div style="background-color: @AccountInfo.Wn7.Wn7ScaleColor(); width: 100%; height: 5px; margin-left: 2px; margin-right: 2px;"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>@Localize["Average Damage"]:</td>
|
||||
<td><b>@AccountInfo.AvgDamage.ToString("N0")</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>@Localize["Average XP"]:</td>
|
||||
<td><b>@AccountInfo.AvgXp.ToString("N0")</b></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-md-6 col-lg-6">
|
||||
@if(MostRelevantTank != null)
|
||||
{
|
||||
<p>@MostRelevantTank.Name</p>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</RadzenCard>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public IAccount AccountInfo { get; set; }
|
||||
|
||||
public ITank? MostRelevantTank;
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
MostRelevantTank = AccountInfo?.Tanks?.Where(t => t.Battles > 50).OrderByDescending(t => t.Wn7).FirstOrDefault();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user