[frontend] Move follows you badge next to identifier

This commit is contained in:
pancakes 2024-11-16 20:20:45 +10:00 committed by Laura Hausmann
parent b5ced00a73
commit e0d63d9a6b
No known key found for this signature in database
GPG key ID: D044E84C5BE01605
4 changed files with 13 additions and 4 deletions

View file

@ -5,10 +5,6 @@
@inject IStringLocalizer<Localization> Loc;
<div class="profile-info">
<div class="badges">
@if (UserProfile.Relations.HasFlag(Relations.FollowedBy))
{
<span class="badge">@Loc["Follows you"]</span>
}
@switch (UserProfile.Role)
{
case Role.Moderator:

View file

@ -52,6 +52,7 @@
}
.badge {
display: inline-block;
padding: 0 0.5rem;
background-color: var(--highlight-color);
border-radius: 0.5rem;

View file

@ -34,6 +34,10 @@
var host = $"@{UserResponse.Host}";
@host
}
@if (Profile != null && Profile.Relations.HasFlag(Relations.FollowedBy))
{
<span class="follows-badge">Follows you</span>
}
</div>
</div>
</div>

View file

@ -27,6 +27,14 @@
font-size: 1rem;
}
.follows-badge {
display: inline-block;
padding: 0 0.5rem;
background-color: var(--highlight-color);
border-radius: 0.5rem;
margin-left: 0.5rem;
}
.profile-card {
margin: auto;
margin-top: 1rem;