mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-28 16:08:38 +00:00
Add ability to hide comments on levels and profiles
This commit is contained in:
parent
0b8c0cbfb4
commit
8fe9bd4c57
12 changed files with 123 additions and 16 deletions
|
@ -17,7 +17,7 @@ public class SlotPage : BaseLayout
|
|||
public List<Review> Reviews = new();
|
||||
public List<Photo> Photos = new();
|
||||
|
||||
public readonly bool CommentsEnabled = ServerConfiguration.Instance.UserGeneratedContentLimits.LevelCommentsEnabled;
|
||||
public bool CommentsEnabled;
|
||||
public readonly bool ReviewsEnabled = ServerConfiguration.Instance.UserGeneratedContentLimits.LevelReviewsEnabled;
|
||||
|
||||
public Slot? Slot;
|
||||
|
@ -58,6 +58,7 @@ public class SlotPage : BaseLayout
|
|||
|
||||
this.Slot = slot;
|
||||
|
||||
this.CommentsEnabled = ServerConfiguration.Instance.UserGeneratedContentLimits.LevelCommentsEnabled && this.Slot.CommentsEnabled;
|
||||
if (this.CommentsEnabled)
|
||||
{
|
||||
this.Comments = await this.Database.Comments.Include(p => p.Poster)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue