diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 00000000..c63ef1ed --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,5 @@ +image: gitpod/workspace-dotnet + +vscode: + extensions: + - muhammad-sammy.csharp diff --git a/ProjectLighthouse.Servers.Website/Pages/Errors/NotFoundPage.cshtml b/ProjectLighthouse.Servers.Website/Pages/Errors/NotFoundPage.cshtml index ae9af46d..906b3adf 100644 --- a/ProjectLighthouse.Servers.Website/Pages/Errors/NotFoundPage.cshtml +++ b/ProjectLighthouse.Servers.Website/Pages/Errors/NotFoundPage.cshtml @@ -4,8 +4,8 @@ @{ Layout = "Layouts/BaseLayout"; Model.Title = "Not Found"; - Model.Description = "The page was not found."; + Model.Description = "The requested page or resource could not be found."; }

@Model.Description

-

This may be due to a lack of permission such as not being signed in, or maybe the page just isn't there.

+

You may need to sign in to view this page.

diff --git a/ProjectLighthouse.Servers.Website/Pages/Partials/CommentsPartial.cshtml b/ProjectLighthouse.Servers.Website/Pages/Partials/CommentsPartial.cshtml index 9d239584..349ee6b5 100644 --- a/ProjectLighthouse.Servers.Website/Pages/Partials/CommentsPartial.cshtml +++ b/ProjectLighthouse.Servers.Website/Pages/Partials/CommentsPartial.cshtml @@ -16,12 +16,20 @@ {

There are no comments.

} + else if (Model.ProfileUser.IsBanned) + { +

Comments are disabled because the user is banned.

+ } else if (!Model.CommentsEnabled) { Comments are disabled. } + else if (Model.Comments.Count > 50) + { +

There are more than 50 comments. Displaying the newest ones.

+ } else { int count = Model.Comments.Count; diff --git a/ProjectLighthouse.Servers.Website/Pages/UserPage.cshtml b/ProjectLighthouse.Servers.Website/Pages/UserPage.cshtml index 9785b060..c1cac229 100644 --- a/ProjectLighthouse.Servers.Website/Pages/UserPage.cshtml +++ b/ProjectLighthouse.Servers.Website/Pages/UserPage.cshtml @@ -23,18 +23,21 @@ @if (Model.ProfileUser.IsBanned) {
-

User is currently banned!

@if (Model.User != null && Model.User.IsModerator) { +

There is an active moderation case on this account.

Reason: - "@Model.ProfileUser.BannedReason" + "@Model.ProfileUser.BannedReason"
+ Case ID: + @Model.Case?.CaseId

- Note: Only you and other moderators may view the ban reason. + Only you and other moderators may view the ban reason.

} else { -

For shame...

+

This user is currently banned.

+

Users who violate our Community Guidelines will be moderated. Be sure to follow the rules!

}
} @@ -268,8 +271,18 @@ } + + @if (Model.ProfileUser.IsBanned && Model.Case != null) + { +
+ + + Unban User + +
+ } - @if (Model.ProfileUser.CommentsEnabled) + @if (Model.ProfileUser.CommentsEnabled && !Model.ProfileUser.IsBanned) {
@@ -283,7 +296,7 @@
- Wipe user's earth decorations + Wipe User Earth Decorations
diff --git a/ProjectLighthouse.Servers.Website/Pages/UserPage.cshtml.cs b/ProjectLighthouse.Servers.Website/Pages/UserPage.cshtml.cs index 1e32515e..4d0fc4a0 100644 --- a/ProjectLighthouse.Servers.Website/Pages/UserPage.cshtml.cs +++ b/ProjectLighthouse.Servers.Website/Pages/UserPage.cshtml.cs @@ -4,6 +4,7 @@ using LBPUnion.ProjectLighthouse.Levels; using LBPUnion.ProjectLighthouse.PlayerData; using LBPUnion.ProjectLighthouse.PlayerData.Profiles; using LBPUnion.ProjectLighthouse.Servers.Website.Pages.Layouts; +using LBPUnion.ProjectLighthouse.Administration; using LBPUnion.ProjectLighthouse.Types; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; @@ -24,6 +25,8 @@ public class UserPage : BaseLayout public List? HeartedSlots; public List? QueuedSlots; + public ModerationCase? Case; + public User? ProfileUser; public UserPage(Database database) : base(database) {}