[frontend/components] Add admin and moderator badges to profile info

This commit is contained in:
pancakes 2024-11-16 19:30:52 +10:00 committed by Laura Hausmann
parent 14201c8489
commit a79d012fcb
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -9,6 +9,23 @@
{ {
<span class="badge">@Loc["Follows you"]</span> <span class="badge">@Loc["Follows you"]</span>
} }
@switch (UserProfile.Role)
{
case Role.Moderator:
<span class="badge">
<Icon Name="Icons.ShieldWarning" Size="1.3em"/>
@Loc["Moderator"]
</span>
break;
case Role.Admin:
<span class="badge">
<Icon Name="Icons.ShieldStar" Size="1.3em"/>
@Loc["Admin"]
</span>
break;
default:
break;
}
</div> </div>
@if (UserProfile.Bio != null) @if (UserProfile.Bio != null)
{ {