mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-06 03:48:40 +00:00
Website UI redesign and QOL changes (#601)
* Initial support for leaderboards and some refactoring * Start of UI redesign * Finish slot and user redesign, added deletion of comments, reviews, scores, and photos * Remove leftover debug print * Fix bug in permission check * Simplify sidebar code and add hearted and queued levels * Fix navbar scrolling on mobile and refactor SlotCardPartial
This commit is contained in:
parent
37b0925cba
commit
f4cad21061
40 changed files with 779 additions and 255 deletions
|
@ -16,6 +16,7 @@ public class SlotPage : BaseLayout
|
|||
public List<Comment> Comments = new();
|
||||
public List<Review> Reviews = new();
|
||||
public List<Photo> Photos = new();
|
||||
public List<Score> Scores = new();
|
||||
|
||||
public bool CommentsEnabled;
|
||||
public readonly bool ReviewsEnabled = ServerConfiguration.Instance.UserGeneratedContentLimits.LevelReviewsEnabled;
|
||||
|
@ -93,6 +94,12 @@ public class SlotPage : BaseLayout
|
|||
.Take(10)
|
||||
.ToListAsync();
|
||||
|
||||
this.Scores = await this.Database.Scores.OrderByDescending(s => s.Points)
|
||||
.ThenByDescending(s => s.ScoreId)
|
||||
.Where(s => s.SlotId == id)
|
||||
.Take(10)
|
||||
.ToListAsync();
|
||||
|
||||
if (this.User == null) return this.Page();
|
||||
|
||||
foreach (Comment c in this.Comments)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue