Website visual QOL changes (#651)

* Website visual QOL changes

* Remove resource wording from 404

Co-authored-by: Josh <josh@slendy.pw>

* Moderation case type clarity change

* Re-arrange how comments are hidden if banned

* Revert CommentsPartial change

* 404 changes

* Change public ban "reason" message to be more generic

* Update ProjectLighthouse.Servers.Website/Pages/UserPage.cshtml

Co-authored-by: Josh <josh@slendy.pw>

* Remove duplicated elements

---------

Co-authored-by: Josh <josh@slendy.pw>
This commit is contained in:
koko 2023-01-29 19:58:05 -05:00 committed by GitHub
commit 2c2f31ad38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 9 deletions

View file

@ -4,8 +4,8 @@
@{ @{
Layout = "Layouts/BaseLayout"; Layout = "Layouts/BaseLayout";
Model.Title = "Not Found"; Model.Title = "Not Found";
Model.Description = "The page was not found."; Model.Description = "Sorry, but the page you requested could not be found.";
} }
<p>@Model.Description</p> <p>@Model.Description</p>
<p>This may be due to a lack of permission such as not being signed in, or maybe the page just isn't there.</p> <p>Take a peek at the <a href="/">homepage</a> to see if you can find what you were looking for.</p>

View file

@ -23,18 +23,18 @@
@if (Model.ProfileUser.IsBanned) @if (Model.ProfileUser.IsBanned)
{ {
<div class="ui inverted red segment"> <div class="ui inverted red segment">
<h2>User is currently banned!</h2> <h3 style="margin-bottom:3px;"><i class="ban icon"></i> This user is currently banned.</h3>
@if (Model.User != null && Model.User.IsModerator) @if (Model.User != null && Model.User.IsModerator)
{ {
<b>Reason:</b> <b>Reason:</b>
<span>"@Model.ProfileUser.BannedReason"</span> <span>"@Model.ProfileUser.BannedReason"</span>
<p> <p>
<i>Note: Only you and other moderators may view the ban reason.</i> <i>Only you and other moderators may view the ban reason.</i>
</p> </p>
} }
else else
{ {
<p>For shame...</p> <p>Users who engage in inappropriate, offensive, or violent actions will be moderated. Be sure to follow the rules!</p>
} }
</div> </div>
} }
@ -164,8 +164,17 @@
} }
<div class="@divLength wide stretched column"> <div class="@divLength wide stretched column">
<div class="lh-content" id="lh-comments"> <div class="lh-content" id="lh-comments">
@await Html.PartialAsync("Partials/CommentsPartial", new ViewDataDictionary(ViewData.WithLang(language).WithTime(timeZone)) @if (Model.ProfileUser.IsBanned)
{ {"PageOwner", Model.ProfileUser.UserId}, }) {
<div class="ui yellow segment" id="comments">
<p>Comments are disabled because the user is banned.</p>
</div>
}
else
{
@await Html.PartialAsync("Partials/CommentsPartial", new ViewDataDictionary(ViewData.WithLang(language).WithTime(timeZone))
{ {"PageOwner", Model.ProfileUser.UserId}, })
}
</div> </div>
<div class="lh-content" id="lh-photos"> <div class="lh-content" id="lh-photos">
<div class="ui purple segment" id="photos"> <div class="ui purple segment" id="photos">
@ -344,4 +353,4 @@ if (selectedElement != null) {
let sidebarEle = document.querySelector("[target=" + selectedElement.id + "]") let sidebarEle = document.querySelector("[target=" + selectedElement.id + "]")
setVisible(sidebarEle); setVisible(sidebarEle);
} }
</script> </script>