mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-21 02:17:20 +02:00
feat: tanks tree tank card base info
This commit is contained in:
1 parent
91f3213122
commit
0d98e81a8f
2 files changed
+32
-14
No files matched your search
@@ -1,32 +1,48 @@
|
|||||||
@inherits PlayerInfoTanksTreeBase;
|
@using WotBlitzStatisticsPro.Blazor.Helpers
|
||||||
|
@inherits PlayerInfoTanksTreeBase;
|
||||||
<div style="overflow-y: auto; overflow-x: auto;">
|
<div style="overflow-y: auto; overflow-x: auto;">
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
width="1400"
|
width="1400"
|
||||||
height="@FrameHeigth"
|
height="@FrameHeigth"
|
||||||
style="background-color: darkcyan; ">
|
style="background-color: darkcyan; ">
|
||||||
@for (int i = 0; i < 3; i++)
|
@for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
<svg x="20"
|
<svg
|
||||||
y="@(i * (120 + 20) + 20)"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
width="200"
|
x="20"
|
||||||
height="120">
|
y="@(i * (CardWidth + 20) + 20)"
|
||||||
|
width="@CardWidth"
|
||||||
|
height="@CardHeigth">
|
||||||
<g>
|
<g>
|
||||||
|
<!--Rect fill = #275950 - researched, #2E353B - unresearched, #66502b - prem-->
|
||||||
<rect
|
<rect
|
||||||
x="0"
|
x="0"
|
||||||
y="0"
|
y="0"
|
||||||
width="200"
|
width="@CardWidth"
|
||||||
height="120"
|
height="@CardHeigth"
|
||||||
rx="10"
|
rx="10"
|
||||||
ry="10"
|
ry="10"
|
||||||
fill="#275950"
|
fill="@(i == 0 ? "#275950" : (i == 1 ? "#2E353B" : "#66502b"))"
|
||||||
stroke="#4a8777">
|
stroke="#4a8777">
|
||||||
</rect>
|
</rect>
|
||||||
<text x="5" y="5" fill="white" text-anchor="start" alignment-baseline="before-edge">
|
|
||||||
|
<!--Tank type-->
|
||||||
|
<image x="7" y="7" width="25" height="25" href="@TanksList.ToArray()[i].TankTypeId.TankTypeAsset(i == 2)"/>
|
||||||
|
<!--Tank tier-->
|
||||||
|
<text x="33" y="7" fill="@(i == 2 ? @Constants.ClanTagColor : "white")" text-anchor="start" alignment-baseline="before-edge" font-family="Segoe UI" font-size="19">
|
||||||
|
@TanksList.ToArray()[i].Tier.RomanNumber()
|
||||||
|
</text>
|
||||||
|
<!--TankImage-->
|
||||||
|
<image x="@((CardWidth - 95) / 2)" y="@((CardHeigth - 70) / 2)" width="95" height="70" href="@TanksList.ToArray()[i].PreviewImage"/>
|
||||||
|
<!--TankName-->
|
||||||
|
<text x="33" y="@(CardHeigth - 25)" fill="@(i == 2 ? @Constants.ClanTagColor : "white")" text-anchor="start" alignment-baseline="before-edge" font-family="Segoe UI" font-size="12">
|
||||||
@TanksList.ToArray()[i].Name
|
@TanksList.ToArray()[i].Name
|
||||||
</text>
|
</text>
|
||||||
<image x="20" y="20" width="95" height="70" xlink:href="@TanksList.ToArray()[i].PreviewImage"/>
|
|
||||||
|
<!--TODO: Split for researched and unresearched info-->
|
||||||
|
<!--Researched: Mastery, Winrate, Wn7, Battles, LastBattle-->
|
||||||
|
<!--Unresearched: XP, Credits-->
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,9 +23,11 @@ namespace WotBlitzStatisticsPro.Blazor.Pages
|
|||||||
[Inject]
|
[Inject]
|
||||||
public IMediaQueriesService MediaQueriesService { get; set; }
|
public IMediaQueriesService MediaQueriesService { get; set; }
|
||||||
|
|
||||||
public int FrameWidth { get; set; }
|
|
||||||
public int FrameHeigth { get; set; }
|
public int FrameHeigth { get; set; }
|
||||||
|
|
||||||
|
public int CardWidth { get; } = 200;
|
||||||
|
public int CardHeigth { get; } = 120;
|
||||||
|
|
||||||
public string FrameStyle
|
public string FrameStyle
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -36,10 +38,10 @@ namespace WotBlitzStatisticsPro.Blazor.Pages
|
|||||||
|
|
||||||
protected async override Task OnInitializedAsync()
|
protected async override Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
var screenWidth = await MediaQueriesService.WindowWidth();
|
//var screenWidth = await MediaQueriesService.WindowWidth();
|
||||||
var screenHeight = await MediaQueriesService.WindowHeight();
|
var screenHeight = await MediaQueriesService.WindowHeight();
|
||||||
|
|
||||||
FrameWidth = Convert.ToInt32(((decimal)screenWidth) * 0.94m);
|
//FrameWidth = Convert.ToInt32(((decimal)screenWidth) * 0.94m);
|
||||||
FrameHeigth = screenHeight - 390;
|
FrameHeigth = screenHeight - 390;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user