[backend/razor] Add host-part to user public preview

This commit is contained in:
Laura Hausmann 2024-09-18 21:14:17 +02:00
parent 514bf3ff10
commit 7e55d4609b
No known key found for this signature in database
GPG key ID: D044E84C5BE01605
4 changed files with 9 additions and 1 deletions

View file

@ -32,7 +32,7 @@ else
<div class="title">
<span>@(Model.User.DisplayName ?? Model.User.Username)</span>
</div>
<span class="acct">@@@Model.User.Acct</span>
<span class="acct">@@@Model.User.Username<span class="host">@@@Model.User.Host</span></span>
</div>
<div class="bio">
@Html.Raw(Model.Bio ?? "<i>This user hasn't added a bio yet.</i>")

View file

@ -65,6 +65,9 @@ public class UserModel(
if (User is { AvatarUrl: null } || (User is not null && !ShowMedia))
User.AvatarUrl = User.GetIdenticonUrl(instance.Value);
if (User is { Host: null })
User.Host = instance.Value.AccountDomain;
return Page();
}
}

View file

@ -42,3 +42,7 @@
grid-row: 2;
padding-left: 10px;
}
.host {
color: var(--text-dim);
}

View file

@ -10,6 +10,7 @@
--text-main: #dbdbdb;
--text-bright: #fff;
--text-muted: #a9b1ba;
--text-dim: #9aa2aa;
--links: #41adff;
--focus: #0096bfab;
--border: #526980;