@page "/slot/{id:int}" @using System.Web @using LBPUnion.ProjectLighthouse.Administration @using LBPUnion.ProjectLighthouse.Configuration @using LBPUnion.ProjectLighthouse.Extensions @using LBPUnion.ProjectLighthouse.Files @using LBPUnion.ProjectLighthouse.Helpers @using LBPUnion.ProjectLighthouse.PlayerData @using LBPUnion.ProjectLighthouse.PlayerData.Reviews @using LBPUnion.ProjectLighthouse.Servers.Website.Extensions @model LBPUnion.ProjectLighthouse.Servers.Website.Pages.SlotPage @{ Layout = "Layouts/BaseLayout"; Model.ShowTitleInPage = false; Model.Title = HttpUtility.HtmlDecode(Model.Slot?.Name ?? ""); Model.Description = HttpUtility.HtmlDecode(Model.Slot?.Description ?? ""); bool isMobile = this.Request.IsMobile(); string language = Model.GetLanguage(); string timeZone = Model.GetTimeZone(); } @if (Model.Slot!.Hidden) {
Only you and moderators may view this level.
Reason: "@Model.Slot.HiddenReason"For more information please contact a moderator.
@HttpUtility.HtmlDecode(string.IsNullOrEmpty(Model.Slot?.Description) ? "This level has no description." : Model.Slot.Description)
This level has no tags.
} else { foreach (string label in authorLabels.Where(label => !string.IsNullOrEmpty(label))) {There are no reviews.
} else if (!Model.ReviewsEnabled) { Reviews are disabled on this level. } else { int count = Model.Reviews.Count;There @(count == 1 ? "is" : "are") @count review@(count == 1 ? "" : "s").
} @for(int i = 0; i < Model.Reviews.Count; i++) { Review review = Model.Reviews[i]; string faceHash = (review.Thumb switch { -1 => review.Reviewer?.BooHash, 0 => review.Reviewer?.MehHash, 1 => review.Reviewer?.YayHash, _ => throw new ArgumentOutOfRangeException(), }) ?? ""; if (string.IsNullOrWhiteSpace(faceHash) || !FileHelper.ResourceExists(faceHash)) { faceHash = ServerConfiguration.Instance.WebsiteConfiguration.MissingIconHash; } string faceAlt = review.Thumb switch { -1 => "Boo!", 0 => "Meh.", 1 => "Yay!", _ => throw new ArgumentOutOfRangeException(), }; int size = isMobile ? 50 : 100;This review has been deleted by the level author.
} else {This review has been deleted by a moderator.
} } else { @if (review.Labels.Length > 1) { @foreach (string reviewLabel in review.Labels) {This review contains no text.
} else { {@HttpUtility.HtmlDecode(review.Text)
} } }