[backend/razor] Add host-part to user public preview
This commit is contained in:
parent
514bf3ff10
commit
7e55d4609b
4 changed files with 9 additions and 1 deletions
|
@ -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>")
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -42,3 +42,7 @@
|
|||
grid-row: 2;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.host {
|
||||
color: var(--text-dim);
|
||||
}
|
|
@ -10,6 +10,7 @@
|
|||
--text-main: #dbdbdb;
|
||||
--text-bright: #fff;
|
||||
--text-muted: #a9b1ba;
|
||||
--text-dim: #9aa2aa;
|
||||
--links: #41adff;
|
||||
--focus: #0096bfab;
|
||||
--border: #526980;
|
||||
|
|
Loading…
Add table
Reference in a new issue