mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-28 16:08:38 +00:00
Properly organize mod panel related pages
This commit is contained in:
parent
e962c2dee4
commit
5b1342c29d
10 changed files with 10 additions and 13 deletions
|
@ -0,0 +1,53 @@
|
|||
@page "/moderation"
|
||||
@using System.Diagnostics
|
||||
@using LBPUnion.ProjectLighthouse.Administration
|
||||
@using LBPUnion.ProjectLighthouse.Extensions
|
||||
@using LBPUnion.ProjectLighthouse.Localization.StringLists
|
||||
@model LBPUnion.ProjectLighthouse.Servers.Website.Pages.Moderation.ModPanelPage
|
||||
|
||||
@{
|
||||
Layout = "Layouts/BaseLayout";
|
||||
Model.Title = Model.Translate(ModPanelStrings.ModPanelTitle);
|
||||
|
||||
if (Model.User == null) throw new ArgumentNullException($"{nameof(Model)}.{nameof(User)}");
|
||||
|
||||
// Technically, this should never happen but I'm going to handle it anyways.
|
||||
if (!Model.User.IsModerator)
|
||||
{
|
||||
if(Debugger.IsAttached) Debugger.Break();
|
||||
throw new Exception("Tried to render mod panel with user whose not mod somehow???");
|
||||
}
|
||||
}
|
||||
|
||||
<p>@Model.Translate(ModPanelStrings.Greeting, Model.User.Username)</p>
|
||||
|
||||
@if (!this.Request.IsMobile())
|
||||
{
|
||||
<div class="ui grid">
|
||||
@foreach (AdminPanelStatistic statistic in Model.Statistics)
|
||||
{
|
||||
@await Html.PartialAsync("Partials/AdminPanelStatisticPartial", statistic)
|
||||
}
|
||||
</div>
|
||||
<br>
|
||||
}
|
||||
else
|
||||
{
|
||||
@foreach (AdminPanelStatistic statistic in Model.Statistics)
|
||||
{
|
||||
@await Html.PartialAsync("Partials/AdminPanelStatisticPartial", statistic)
|
||||
<br>
|
||||
}
|
||||
}
|
||||
|
||||
<h2>Actions</h2>
|
||||
|
||||
<a href="/moderation/bannedUsers" class="ui red button">
|
||||
<i class="users icon"></i>
|
||||
<span>View banned users</span>
|
||||
</a><br/><br/>
|
||||
|
||||
<a href="/moderation/hiddenSlots" class="ui yellow button">
|
||||
<i class="certificate icon"></i>
|
||||
<span>View hidden levels</span>
|
||||
</a>
|
Loading…
Add table
Add a link
Reference in a new issue