@page "/user/{userId:int}"
@using System.Web
@using LBPUnion.ProjectLighthouse.Extensions
@using LBPUnion.ProjectLighthouse.Localization.StringLists
@using LBPUnion.ProjectLighthouse.PlayerData
@using LBPUnion.ProjectLighthouse.Types
@model LBPUnion.ProjectLighthouse.Servers.Website.Pages.UserPage
@{
Layout = "Layouts/BaseLayout";
Model.ShowTitleInPage = false;
Model.Title = Model.Translate(ProfileStrings.Title, Model.ProfileUser!.Username);
Model.Description = Model.ProfileUser!.Biography;
}
@if (Model.ProfileUser.Banned)
{
User is currently banned!
@if (Model.User != null && Model.User.IsAdmin)
{
Reason:
"@Model.ProfileUser.BannedReason"
Note: Only you and other admins may view the ban reason.
Unban User
}
else
{
For shame...
}
}
@await Html.PartialAsync("Partials/UserCardPartial", Model.ProfileUser, new ViewDataDictionary(ViewData)
{
{
"ShowLink", false
},
{
"IsMobile", Model.Request.IsMobile()
},
{
"Language", Model.GetLanguage()
}
})
@Model.Translate(ProfileStrings.Biography)
@if (string.IsNullOrWhiteSpace(Model.ProfileUser.Biography))
{
@Model.Translate(ProfileStrings.NoBiography, Model.ProfileUser.Username)
}
else
{
@HttpUtility.HtmlDecode(Model.ProfileUser.Biography)
}
@Model.Translate(GeneralStrings.RecentActivity)
@Model.Translate(GeneralStrings.Soon)
@if (Model.Photos != null && Model.Photos.Count != 0)
{
@Model.Translate(GeneralStrings.RecentPhotos)
@foreach (Photo photo in Model.Photos)
{
@await Html.PartialAsync("Partials/PhotoPartial", photo)
}
}
@await Html.PartialAsync("Partials/CommentsPartial")
@if (Model.User != null && Model.User.IsAdmin)
{
Admin Options
@if (!Model.ProfileUser.Banned)
{
}
@await Html.PartialAsync("Partials/AdminSetGrantedSlotsFormPartial", Model.ProfileUser)
}