|
10 | 10 |
|
11 | 11 | <style> |
12 | 12 | .check-label:hover { |
13 | | - color: white !important; |
14 | | - background-color: #adb5bd !important; |
15 | | - border-color: white !important; |
| 13 | + color: white !important; |
| 14 | + background-color: #adb5bd !important; |
| 15 | + border-color: white !important; |
16 | 16 | } |
17 | 17 | </style> |
18 | 18 |
|
|
25 | 25 | <nav> |
26 | 26 | <div class="nav nav-tabs" id="nav-tab" role="tablist"> |
27 | 27 | <button class="@(initPlayers ? "nav-link" : "nav-link active")" id="nav-home-tab" |
28 | | - data-bs-toggle="tab" data-bs-target="#nav-rating" type="button" role="tab" |
29 | | - aria-controls="nav-ratings" aria-selected="true" @onclick="ByRating"> |
| 28 | + data-bs-toggle="tab" data-bs-target="#nav-rating" type="button" role="tab" |
| 29 | + aria-controls="nav-ratings" aria-selected="true" @onclick="ByRating"> |
30 | 30 | By Ratings |
31 | 31 | </button> |
32 | 32 | <button class="@(initPlayers ? "nav-link active" : "nav-link")" id="nav-profile-tab" |
33 | | - data-bs-toggle="tab" data-bs-target="#nav-players" type="button" role="tab" |
34 | | - aria-controls="nav-players" aria-selected="false" @onclick="ByPlayers"> |
| 33 | + data-bs-toggle="tab" data-bs-target="#nav-players" type="button" role="tab" |
| 34 | + aria-controls="nav-players" aria-selected="false" @onclick="ByPlayers"> |
35 | 35 | By Players |
36 | 36 | </button> |
37 | 37 | </div> |
38 | 38 | </nav> |
39 | 39 | <div class="tab-content mt-1 bgchart p-2 border rounded" id="nav-tabContent"> |
40 | 40 | <div class="@(initPlayers ? "tab-pane fade" : "tab-pane fade show active")" id="nav-rating" |
41 | | - role="tabpanel" aria-labelledby="nav-rating-tab"> |
| 41 | + role="tabpanel" aria-labelledby="nav-rating-tab"> |
42 | 42 | <RatingRangeRequest OnRangeSelected="e => LoadData()" /> |
43 | 43 | </div> |
44 | 44 | <div class="@(initPlayers ? "tab-pane fade show active" : "tab-pane fade")" id="nav-players" |
45 | | - role="tabpanel" aria-labelledby="nav-players-tab"> |
| 45 | + role="tabpanel" aria-labelledby="nav-players-tab"> |
46 | 46 | <BuildPlayerRequest @ref="buildPlayerRequest" OnPlayersSet="e => LoadData()" /> |
47 | 47 | </div> |
48 | 48 | </div> |
|
63 | 63 | } |
64 | 64 | </div> |
65 | 65 | <CmdrSelectComponent Selected="Request.Interest" None="false" |
66 | | - Std="@(Request.RatingType == RatingType.Std || Request.RatingType == RatingType.StdTE)" |
67 | | - OnCommanderSelected="SelectInterest" /> |
| 66 | + Std="@(Request.RatingType == RatingType.Std || Request.RatingType == RatingType.StdTE)" |
| 67 | + OnCommanderSelected="SelectInterest" /> |
68 | 68 | </div> |
69 | 69 | <div> |
70 | 70 | <CmdrSelectComponent Selected="Request.Versus" None="true" |
71 | | - Std="@(Request.RatingType == RatingType.Std || Request.RatingType == RatingType.StdTE)" |
72 | | - OnCommanderSelected="SelectVersus" /> |
| 71 | + Std="@(Request.RatingType == RatingType.Std || Request.RatingType == RatingType.StdTE)" |
| 72 | + OnCommanderSelected="SelectVersus" /> |
73 | 73 | </div> |
74 | 74 | </div> |
75 | 75 | </div> |
|
98 | 98 | Player Ratings Range |
99 | 99 | <span class="text-danger"> |
100 | 100 | @(Request.FromRating <= Data.MinBuildRating ? "0" |
101 | | - : Request.FromRating) - @(Request.ToRating >= Data.MaxBuildRating ? |
| 101 | + : Request.FromRating) - @(Request.ToRating >= Data.MaxBuildRating ? |
102 | 102 | $"{Data.MaxBuildRating}+" : Request.ToRating) |
103 | 103 | </span> |
104 | 104 | </h5> |
105 | 105 | } |
106 | 106 | <div class="row"> |
107 | | - <div class="col-auto text-center align-self-center"> |
| 107 | + <div class="col-auto mt-1"> |
108 | 108 | <span class="fw-bold">Breakpoint</span> |
109 | 109 | </div> |
110 | 110 | <div class="col-auto"> |
|
118 | 118 | continue; |
119 | 119 | } |
120 | 120 | <input type="radio" class="btn-check" name="bptoggle" id="@($"buildbp{bp}")" |
121 | | - checked="@(Request.Breakpoint == bp)" |
122 | | - autocomplete="off" @onchange="e => SetBreakpoint(e, bp)"> |
123 | | - <label class="btn btn-outline-light check-label" for="@($"buildbp{bp}")"> |
| 121 | + checked="@(Request.Breakpoint == bp)" |
| 122 | + autocomplete="off" @onchange="e => SetBreakpoint(e, bp)"> |
| 123 | + <label class="btn btn-sm btn-outline-light check-label" for="@($"buildbp{bp}")"> |
124 | 124 | @(bp == Breakpoint.All ? "Game End" : $"{bp}") |
125 | 125 | </label> |
126 | 126 | } |
| 127 | + <div class="form-check form-switch mt-1 ms-1"> |
| 128 | + <label class="form-check-label"> |
| 129 | + Adv. Table |
| 130 | + <input type="checkbox" class="form-check-input" @bind-value="ShowFullStats" /> |
| 131 | + </label> |
| 132 | + |
| 133 | + </div> |
127 | 134 | </div> |
128 | 135 | </fieldset> |
129 | 136 | </form> |
|
147 | 154 | </div> |
148 | 155 | <div class="col-auto"> |
149 | 156 | <span class="badge bgchart2 border rounded"> |
150 | | - Winrate<br><span class="text-warning">@Response.BuildCounts.Winrate.ToString("N2", CultureInfo.InvariantCulture)%</span> |
| 157 | + Winrate<br><span class="text-warning">@Response.BuildCounts.Winrate.ToString("N2")%</span> |
151 | 158 | </span> |
152 | 159 | </div> |
153 | 160 | </div> |
|
159 | 166 | </div> |
160 | 167 | <div class="col-auto"> |
161 | 168 | <span class="badge bgchart2 border rounded"> |
162 | | - ∅ Gas<br><span class="text-warning">@Response.BuildCounts.Gas.ToString("N2", CultureInfo.InvariantCulture)</span> |
| 169 | + ∅ Gas<br><span class="text-warning">@Response.BuildCounts.Gas.ToString("N2")</span> |
163 | 170 | </span> |
164 | 171 | </div> |
165 | 172 | <div class="col-auto"> |
|
169 | 176 | </div> |
170 | 177 | </div> |
171 | 178 | <div class="d-flex mt-1 justify-content-center"> |
172 | | - <UnitsTable Units="Response.Units" /> |
| 179 | + <UnitsTable Units="Response.Units" ShowFullStats="ShowFullStats" /> |
173 | 180 | </div> |
174 | 181 | </div> |
175 | 182 | </div> |
176 | 183 | </div> |
177 | | - <div class="col-auto" style="min-width: 800px;"> |
| 184 | + <div class="col-auto"> |
178 | 185 | <div> |
179 | 186 | <BuildMapComponent @ref="buildMapComponent" Request="Request" /> |
180 | 187 | </div> |
181 | 188 | <div class="ms-2"> |
182 | 189 | <button class="btn btn-sm btn-outline-light bgchart" |
183 | | - type="button" |
184 | | - data-bs-toggle="collapse" |
185 | | - data-bs-target="#buildreplays" |
186 | | - aria-expanded="false" |
187 | | - aria-controls="buildreplays" |
188 | | - @onclick="e => showReplays = !showReplays"> |
| 190 | + type="button" |
| 191 | + data-bs-toggle="collapse" |
| 192 | + data-bs-target="#buildreplays" |
| 193 | + aria-expanded="false" |
| 194 | + aria-controls="buildreplays" |
| 195 | + @onclick="e => showReplays = !showReplays"> |
189 | 196 | <span class="bi @(showReplays ? "bi bi-chevron-double-down" : "bi-chevron-double-up")"></span> |
190 | 197 | Replays |
191 | 198 | </button> |
|
194 | 201 | @if (showReplays) |
195 | 202 | { |
196 | 203 | <BuildReplaysComponent @ref="buildReplaysComponent" Request="Request" |
197 | | - OnReplayRequest="LoadReplay" |
198 | | - OnMapRequest="MapRequest" /> |
| 204 | + OnReplayRequest="LoadReplay" |
| 205 | + OnMapRequest="MapRequest" /> |
199 | 206 | } |
200 | 207 | </div> |
| 208 | + <div class="border rounded border-secondary bgchart mt-2" |
| 209 | + style="min-width: 700px; width: 40vw; height: calc(40vw * 0.5); min-height: 350px;"> |
| 210 | + <UnitsChartComponent @ref="unitsChartComponent" Request="Request" /> |
| 211 | + </div> |
201 | 212 | </div> |
202 | 213 | </div> |
203 | 214 | </div> |
|
238 | 249 | BuildReplaysComponent? buildReplaysComponent; |
239 | 250 | BuildMapComponent? buildMapComponent; |
240 | 251 | ReplayDto? replayDto = null; |
| 252 | + private bool ShowFullStats; |
| 253 | + UnitsChartComponent? unitsChartComponent; |
241 | 254 |
|
242 | 255 | protected override void OnInitialized() |
243 | 256 | { |
|
280 | 293 | buildReplaysComponent?.Reload(); |
281 | 294 | buildMapComponent?.Update(Request, bpOnly); |
282 | 295 | } |
| 296 | + unitsChartComponent?.Update(Request); |
283 | 297 | } |
284 | 298 |
|
285 | 299 | private void SelectInterest(Commander cmdr) |
|
0 commit comments