[frontend/components] Add bot indicator to notes (ISH-407)

This commit is contained in:
pancakes 2024-11-16 21:03:44 +10:00 committed by Laura Hausmann
parent e0d63d9a6b
commit cd84b480a6
No known key found for this signature in database
GPG key ID: D044E84C5BE01605
2 changed files with 14 additions and 1 deletions

View file

@ -1,4 +1,5 @@
@using Iceshrimp.Shared.Schemas.Web
@using Iceshrimp.Assets.PhosphorIcons
@inject NavigationManager Nav
@if (Indented == false)
@ -7,7 +8,13 @@
}
<div class="name-section">
<span class="display-name"><UserDisplayName User="@User"/></span>
<span class="identifier">@@@User.Username@(User.Host != null ? $"@{User.Host}" : "")</span>
<span class="identifier">
@@@User.Username@(User.Host != null ? $"@{User.Host}" : "")
@if (User.IsBot)
{
<Icon Name="Icons.Robot" Size="1.3em" title="Automated"/>
}
</span>
</div>
@code {

View file

@ -30,4 +30,10 @@
.identifier {
white-space: wrap;
}
::deep .identifier .ph {
display: inline-block;
margin-left: 0.5em;
vertical-align: middle;
}