Show rootlevel hash to moderators on slot page (#964)

This commit is contained in:
sudokoko 2024-01-10 19:32:47 -05:00 committed by GitHub
parent 6e1c1ee730
commit e29ca6cdcb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -72,7 +72,9 @@ else
<div class="eight wide column">
<div class="ui blue segment">
<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>
@if (isMobile)
@ -80,6 +82,18 @@ else
<br/>
}
<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">
<h2>Tags</h2>
@{
@ -92,6 +106,7 @@ else
{
authorLabels = Model.Slot?.AuthorLabels.Split(",", StringSplitOptions.RemoveEmptyEntries) ?? Array.Empty<string>();
}
if (authorLabels.Length == 0)
{
<p>This level has no tags.</p>