[frontend/components] Add follows you badge to profile info

This commit is contained in:
pancakes 2024-11-16 19:10:14 +10:00 committed by Laura Hausmann
parent 60ed8d3c3c
commit 1c587584bc
No known key found for this signature in database
GPG key ID: D044E84C5BE01605
2 changed files with 26 additions and 1 deletions

View file

@ -4,6 +4,12 @@
@using Iceshrimp.Assets.PhosphorIcons @using Iceshrimp.Assets.PhosphorIcons
@inject IStringLocalizer<Localization> Loc; @inject IStringLocalizer<Localization> Loc;
<div class="profile-info"> <div class="profile-info">
<div class="badges">
@if (UserProfile.Relations.HasFlag(Relations.FollowedBy))
{
<span class="badge">@Loc["Follows you"]</span>
}
</div>
@if (UserProfile.Bio != null) @if (UserProfile.Bio != null)
{ {
<div class="bio"> <div class="bio">

View file

@ -44,6 +44,25 @@
} }
} }
.badges {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin: 1rem 0;
}
.badge {
padding: 0 0.5rem;
background-color: var(--highlight-color);
border-radius: 0.5rem;
}
::deep {
.badge .ph {
vertical-align: text-bottom;
}
}
@media (max-width: 640px) { @media (max-width: 640px) {
::deep .field { ::deep .field {
flex-direction: column; flex-direction: column;