Highlight current user in leaderboard
This commit is contained in:
parent
20525fb014
commit
96db68b94b
@ -44,7 +44,7 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<MudTable Loading="isLoading" Items="@response.Leaderboard" Class="leaderboard-table" Elevation="0" Outlined="false" Dense="true" Striped="true">
|
<MudTable RowClassFunc="@GetActiveRowClass" Loading="isLoading" Items="@response.Leaderboard" Class="leaderboard-table" Elevation="0" Outlined="false" Dense="true" Striped="true">
|
||||||
<HeaderContent>
|
<HeaderContent>
|
||||||
<MudTh>@Localizer["Rank"]</MudTh>
|
<MudTh>@Localizer["Rank"]</MudTh>
|
||||||
<MudTh>@Localizer["Player"]</MudTh>
|
<MudTh>@Localizer["Player"]</MudTh>
|
||||||
|
@ -55,4 +55,9 @@ public partial class SongLeaderboardCard
|
|||||||
response.ThrowIfNull();
|
response.ThrowIfNull();
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string GetActiveRowClass(SongLeaderboard leaderboard, int index)
|
||||||
|
{
|
||||||
|
return leaderboard.Baid == Baid ? "is-current-user" : "";
|
||||||
|
}
|
||||||
}
|
}
|
@ -55,6 +55,16 @@
|
|||||||
transform: scale(1.1);
|
transform: scale(1.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tr.is-current-user {
|
||||||
|
background-color: #bad4f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.is-current-user td,
|
||||||
|
tr.is-current-user span,
|
||||||
|
tr.is-current-user p {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
.lang-menu-item .mud-list-item-icon {
|
.lang-menu-item .mud-list-item-icon {
|
||||||
min-width: 26px;
|
min-width: 26px;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user