[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">
|
<div class="title">
|
||||||
<span>@(Model.User.DisplayName ?? Model.User.Username)</span>
|
<span>@(Model.User.DisplayName ?? Model.User.Username)</span>
|
||||||
</div>
|
</div>
|
||||||
<span class="acct">@@@Model.User.Acct</span>
|
<span class="acct">@@@Model.User.Username<span class="host">@@@Model.User.Host</span></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="bio">
|
<div class="bio">
|
||||||
@Html.Raw(Model.Bio ?? "<i>This user hasn't added a bio yet.</i>")
|
@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))
|
if (User is { AvatarUrl: null } || (User is not null && !ShowMedia))
|
||||||
User.AvatarUrl = User.GetIdenticonUrl(instance.Value);
|
User.AvatarUrl = User.GetIdenticonUrl(instance.Value);
|
||||||
|
|
||||||
|
if (User is { Host: null })
|
||||||
|
User.Host = instance.Value.AccountDomain;
|
||||||
|
|
||||||
return Page();
|
return Page();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -41,4 +41,8 @@
|
||||||
grid-column: 2/-1;
|
grid-column: 2/-1;
|
||||||
grid-row: 2;
|
grid-row: 2;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.host {
|
||||||
|
color: var(--text-dim);
|
||||||
}
|
}
|
|
@ -10,6 +10,7 @@
|
||||||
--text-main: #dbdbdb;
|
--text-main: #dbdbdb;
|
||||||
--text-bright: #fff;
|
--text-bright: #fff;
|
||||||
--text-muted: #a9b1ba;
|
--text-muted: #a9b1ba;
|
||||||
|
--text-dim: #9aa2aa;
|
||||||
--links: #41adff;
|
--links: #41adff;
|
||||||
--focus: #0096bfab;
|
--focus: #0096bfab;
|
||||||
--border: #526980;
|
--border: #526980;
|
||||||
|
|
Loading…
Add table
Reference in a new issue