diff --git a/DysonNetwork.Zone/Pages/Posts.cshtml.cs b/DysonNetwork.Zone/Pages/Posts.cshtml.cs index 04603ba..9c64d6e 100644 --- a/DysonNetwork.Zone/Pages/Posts.cshtml.cs +++ b/DysonNetwork.Zone/Pages/Posts.cshtml.cs @@ -2,6 +2,7 @@ using DysonNetwork.Shared.Models; using DysonNetwork.Shared.Proto; using DysonNetwork.Shared.Registry; using DysonNetwork.Zone.Publication; +using Microsoft.AspNetCore.Mvc; // Add this using statement using Microsoft.AspNetCore.Mvc.RazorPages; using PostType = DysonNetwork.Shared.Models.PostType; @@ -14,6 +15,8 @@ public class PostsModel( MarkdownConverter markdownConverter ) : PageModel { + [FromQuery] public bool ShowAll { get; set; } = false; + public SnPublicationSite? Site { get; set; } public SnPublisher? Publisher { get; set; } public List Posts { get; set; } = []; @@ -39,6 +42,8 @@ public class PostsModel( PublisherId = Site!.PublisherId.ToString() }; + if (!ShowAll) request.Types_.Add(DysonNetwork.Shared.Proto.PostType.Article); + var response = await postClient.ListPostsAsync(request); if (response?.Posts != null)