mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-18 11:11:28 +00:00
Show rootlevel hash to moderators on slot page (#964)
This commit is contained in:
parent
6e1c1ee730
commit
e29ca6cdcb
1 changed files with 21 additions and 6 deletions
|
@ -72,7 +72,9 @@ else
|
||||||
<div class="eight wide column">
|
<div class="eight wide column">
|
||||||
<div class="ui blue segment">
|
<div class="ui blue segment">
|
||||||
<h2>Description</h2>
|
<h2>Description</h2>
|
||||||
<p style="overflow-wrap: anywhere">@HttpUtility.HtmlDecode(string.IsNullOrEmpty(Model.Slot?.Description) ? "This level has no description." : Model.Slot.Description)</p>
|
<p style="overflow-wrap: anywhere">
|
||||||
|
@HttpUtility.HtmlDecode(string.IsNullOrEmpty(Model.Slot?.Description) ? "This level has no description." : Model.Slot.Description)
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@if (isMobile)
|
@if (isMobile)
|
||||||
|
@ -80,6 +82,18 @@ else
|
||||||
<br/>
|
<br/>
|
||||||
}
|
}
|
||||||
<div class="eight wide column">
|
<div class="eight wide column">
|
||||||
|
@if (Model.User != null && Model.User.IsModerator)
|
||||||
|
{
|
||||||
|
<div class="ui green segment">
|
||||||
|
<div>
|
||||||
|
<b>Level Hash:</b>
|
||||||
|
<code>
|
||||||
|
@HttpUtility.HtmlDecode(string.IsNullOrWhiteSpace(Model.Slot?.RootLevel) ? "No root level." : Model.Slot.RootLevel)
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<small>You can see this because you are a moderator.</small>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
<div class="ui red segment">
|
<div class="ui red segment">
|
||||||
<h2>Tags</h2>
|
<h2>Tags</h2>
|
||||||
@{
|
@{
|
||||||
|
@ -92,6 +106,7 @@ else
|
||||||
{
|
{
|
||||||
authorLabels = Model.Slot?.AuthorLabels.Split(",", StringSplitOptions.RemoveEmptyEntries) ?? Array.Empty<string>();
|
authorLabels = Model.Slot?.AuthorLabels.Split(",", StringSplitOptions.RemoveEmptyEntries) ?? Array.Empty<string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (authorLabels.Length == 0)
|
if (authorLabels.Length == 0)
|
||||||
{
|
{
|
||||||
<p>This level has no tags.</p>
|
<p>This level has no tags.</p>
|
||||||
|
@ -227,7 +242,7 @@ else
|
||||||
<span>Delete</span>
|
<span>Delete</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
@if (!Model.Slot!.Hidden)
|
@if (!Model.Slot!.Hidden)
|
||||||
{
|
{
|
||||||
<a href="/moderation/newCase?type=@((int)CaseType.LevelHide)&affectedId=@Model.Slot?.SlotId">
|
<a href="/moderation/newCase?type=@((int)CaseType.LevelHide)&affectedId=@Model.Slot?.SlotId">
|
||||||
|
@ -237,7 +252,7 @@ else
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
|
|
||||||
@if (!Model.Slot!.InitiallyLocked && !Model.Slot!.LockedByModerator)
|
@if (!Model.Slot!.InitiallyLocked && !Model.Slot!.LockedByModerator)
|
||||||
{
|
{
|
||||||
<a href="/moderation/newCase?type=@((int)CaseType.LevelLock)&affectedId=@Model.Slot?.SlotId">
|
<a href="/moderation/newCase?type=@((int)CaseType.LevelLock)&affectedId=@Model.Slot?.SlotId">
|
||||||
|
@ -247,7 +262,7 @@ else
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
|
|
||||||
@if (Model.Slot!.CommentsEnabled)
|
@if (Model.Slot!.CommentsEnabled)
|
||||||
{
|
{
|
||||||
<a class="ui yellow button" href="/moderation/newCase?type=@((int)CaseType.LevelDisableComments)&affectedId=@Model.Slot?.SlotId">
|
<a class="ui yellow button" href="/moderation/newCase?type=@((int)CaseType.LevelDisableComments)&affectedId=@Model.Slot?.SlotId">
|
||||||
|
@ -284,7 +299,7 @@ function setVisible(e){
|
||||||
}
|
}
|
||||||
// unhide content
|
// unhide content
|
||||||
eTarget.style.display = "";
|
eTarget.style.display = "";
|
||||||
|
|
||||||
e.classList.add("active");
|
e.classList.add("active");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -303,7 +318,7 @@ if (selectedElement != null) {
|
||||||
while (selectedElement != null && !selectedElement.classList.contains("lh-content")){
|
while (selectedElement != null && !selectedElement.classList.contains("lh-content")){
|
||||||
selectedElement = selectedElement.parentElement;
|
selectedElement = selectedElement.parentElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
let sidebarEle = document.querySelector("[target=" + selectedElement.id + "]")
|
let sidebarEle = document.querySelector("[target=" + selectedElement.id + "]")
|
||||||
setVisible(sidebarEle);
|
setVisible(sidebarEle);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue