Compare commits

..

7 Commits

Author SHA1 Message Date
8642737a07 Configurable post page 2025-12-12 00:10:57 +08:00
8181938aaf Managed mode page will render with layout 2025-12-11 22:25:40 +08:00
922afc2239 🐛 Fix realm query 2025-12-10 22:59:18 +08:00
a071bd2738 Publication site global config data structure 2025-12-10 19:33:00 +08:00
43945fc524 🐛 Fix discovery realms order incorrect 2025-12-07 14:28:41 +08:00
e477429a35 👔 Increase the chance of other type of activities show up
🗑️ Remove debug include in timeline
2025-12-06 21:12:08 +08:00
fe3a057185 👔 Discovery realms will show desc by member count 2025-12-06 21:10:08 +08:00
21 changed files with 488 additions and 145 deletions

View File

@@ -35,7 +35,8 @@ public class RealmServiceGrpc(
: realm.ToProtoValue(); : realm.ToProtoValue();
} }
public override async Task<GetRealmBatchResponse> GetRealmBatch(GetRealmBatchRequest request, ServerCallContext context) public override async Task<GetRealmBatchResponse> GetRealmBatch(GetRealmBatchRequest request,
ServerCallContext context)
{ {
var ids = request.Ids.Select(Guid.Parse).ToList(); var ids = request.Ids.Select(Guid.Parse).ToList();
var realms = await db.Realms.Where(r => ids.Contains(r.Id)).ToListAsync(); var realms = await db.Realms.Where(r => ids.Contains(r.Id)).ToListAsync();
@@ -67,19 +68,33 @@ public class RealmServiceGrpc(
return new GetUserRealmsResponse { RealmIds = { realms.Select(g => g.ToString()) } }; return new GetUserRealmsResponse { RealmIds = { realms.Select(g => g.ToString()) } };
} }
public override async Task<GetPublicRealmsResponse> GetPublicRealms(Empty request, ServerCallContext context) public override Task<GetPublicRealmsResponse> GetPublicRealms(
GetPublicRealmsRequest request,
ServerCallContext context
)
{ {
var realms = await db.Realms.Where(r => r.IsPublic).ToListAsync(); var realmsQueryable = db.Realms.Where(r => r.IsPublic).AsQueryable();
realmsQueryable = request.OrderBy switch
{
"random" => realmsQueryable.OrderBy(_ => EF.Functions.Random()),
"name" => realmsQueryable.OrderBy(r => r.Name),
"popularity" => realmsQueryable.OrderByDescending(r => r.Members.Count),
_ => realmsQueryable.OrderByDescending(r => r.CreatedAt)
};
var response = new GetPublicRealmsResponse(); var response = new GetPublicRealmsResponse();
response.Realms.AddRange(realms.Select(r => r.ToProtoValue())); response.Realms.AddRange(realmsQueryable.Select(r => r.ToProtoValue()));
return response; return Task.FromResult(response);
} }
public override async Task<GetPublicRealmsResponse> SearchRealms(SearchRealmsRequest request, ServerCallContext context) public override async Task<GetPublicRealmsResponse> SearchRealms(SearchRealmsRequest request,
ServerCallContext context)
{ {
var realms = await db.Realms var realms = await db.Realms
.Where(r => r.IsPublic) .Where(r => r.IsPublic)
.Where(r => EF.Functions.Like(r.Slug, $"{request.Query}%") || EF.Functions.Like(r.Name, $"{request.Query}%")) .Where(r => EF.Functions.Like(r.Slug, $"{request.Query}%") ||
EF.Functions.Like(r.Name, $"{request.Query}%"))
.Take(request.Limit) .Take(request.Limit)
.ToListAsync(); .ToListAsync();
var response = new GetPublicRealmsResponse(); var response = new GetPublicRealmsResponse();

View File

@@ -20,6 +20,18 @@ public enum PublicationSiteMode
SelfManaged SelfManaged
} }
public class PublicationSiteConfig
{
public string? StyleOverride { get; set; }
public List<PublicationSiteNavItem>? NavItems { get; set; } = [];
}
public class PublicationSiteNavItem
{
[MaxLength(1024)] public string Label { get; set; } = null!;
[MaxLength(8192)] public string Href { get; set; } = null!;
}
public class SnPublicationSite : ModelBase public class SnPublicationSite : ModelBase
{ {
public Guid Id { get; set; } = Guid.NewGuid(); public Guid Id { get; set; } = Guid.NewGuid();
@@ -29,6 +41,7 @@ public class SnPublicationSite : ModelBase
public PublicationSiteMode Mode { get; set; } = PublicationSiteMode.FullyManaged; public PublicationSiteMode Mode { get; set; } = PublicationSiteMode.FullyManaged;
public List<SnPublicationPage> Pages { get; set; } = []; public List<SnPublicationPage> Pages { get; set; } = [];
[Column(TypeName = "jsonb")] public PublicationSiteConfig Config { get; set; } = new();
public Guid PublisherId { get; set; } public Guid PublisherId { get; set; }
[NotMapped] public SnPublisher Publisher { get; set; } = null!; [NotMapped] public SnPublisher Publisher { get; set; } = null!;
@@ -46,7 +59,11 @@ public enum PublicationPageType
/// The redirect mode allows user to create a shortcut for their own link. /// The redirect mode allows user to create a shortcut for their own link.
/// such as example.solian.page/rickroll -- DyZ 301 -> youtube.com/... /// such as example.solian.page/rickroll -- DyZ 301 -> youtube.com/...
/// </summary> /// </summary>
Redirect Redirect,
/// <summary>
/// The Post Page type allows user render a list of posts based on the preconfigured filter.
/// </summary>
PostPage
} }
public class SnPublicationPage : ModelBase public class SnPublicationPage : ModelBase

View File

@@ -46,7 +46,7 @@ service RealmService {
// Get realms for a user // Get realms for a user
rpc GetUserRealms(GetUserRealmsRequest) returns (GetUserRealmsResponse) {} rpc GetUserRealms(GetUserRealmsRequest) returns (GetUserRealmsResponse) {}
// Get public realms // Get public realms
rpc GetPublicRealms(google.protobuf.Empty) returns (GetPublicRealmsResponse) {} rpc GetPublicRealms(GetPublicRealmsRequest) returns (GetPublicRealmsResponse) {}
// Search public realms // Search public realms
rpc SearchRealms(SearchRealmsRequest) returns (GetPublicRealmsResponse) {} rpc SearchRealms(SearchRealmsRequest) returns (GetPublicRealmsResponse) {}
// Send invitation notification // Send invitation notification
@@ -84,6 +84,10 @@ message GetUserRealmsResponse {
repeated string realm_ids = 1; repeated string realm_ids = 1;
} }
message GetPublicRealmsRequest {
optional string order_by = 1;
}
message GetPublicRealmsResponse { message GetPublicRealmsResponse {
repeated Realm realms = 1; repeated Realm realms = 1;
} }

View File

@@ -27,9 +27,12 @@ public class RemoteRealmService(RealmService.RealmServiceClient realms)
return response.RealmIds.Select(Guid.Parse).ToList(); return response.RealmIds.Select(Guid.Parse).ToList();
} }
public async Task<List<SnRealm>> GetPublicRealms() public async Task<List<SnRealm>> GetPublicRealms(string orderBy = "date")
{ {
var response = await realms.GetPublicRealmsAsync(new Empty()); var response = await realms.GetPublicRealmsAsync(new GetPublicRealmsRequest
{
OrderBy = orderBy
});
return response.Realms.Select(SnRealm.FromProtoValue).ToList(); return response.Realms.Select(SnRealm.FromProtoValue).ToList();
} }

View File

@@ -8,24 +8,10 @@ public class DiscoveryService(RemoteRealmService remoteRealmService)
string? query, string? query,
int take = 10, int take = 10,
int offset = 0, int offset = 0,
bool randomizer = false bool random = false
) )
{ {
var allRealms = await remoteRealmService.GetPublicRealms(); var allRealms = await remoteRealmService.GetPublicRealms(random ? "random" : "popularity");
var communityRealms = allRealms.Where(r => r.IsCommunity); return allRealms.Where(r => r.IsCommunity).Skip(offset).Take(take).ToList();
if (!string.IsNullOrEmpty(query))
{
communityRealms = communityRealms.Where(r =>
r.Name.Contains(query, StringComparison.OrdinalIgnoreCase)
);
}
// Since we don't have CreatedAt in the proto model, we'll just apply randomizer if requested
var orderedRealms = randomizer
? communityRealms.OrderBy(_ => Random.Shared.Next())
: communityRealms;
return orderedRealms.Skip(offset).Take(take).ToList();
} }
} }

View File

@@ -40,26 +40,6 @@ public class PostController(
return Ok(posts); return Ok(posts);
} }
/// <summary>
/// Retrieves a paginated list of posts with optional filtering and sorting.
/// </summary>
/// <param name="includeReplies">Whether to include reply posts in the results. If false, only root posts are returned.</param>
/// <param name="offset">The number of posts to skip for pagination.</param>
/// <param name="take">The maximum number of posts to return (default: 20).</param>
/// <param name="pubName">Filter posts by publisher name.</param>
/// <param name="realmName">Filter posts by realm slug.</param>
/// <param name="type">Filter posts by post type (as integer).</param>
/// <param name="categories">Filter posts by category slugs.</param>
/// <param name="tags">Filter posts by tag slugs.</param>
/// <param name="queryTerm">Search term to filter posts by title, description, or content.</param>
/// <param name="onlyMedia">If true, only returns posts that have attachments.</param>
/// <param name="shuffle">If true, returns posts in random order. If false, orders by published/created date (newest first).</param>
/// <param name="pinned">If true, returns posts that pinned. If false, returns posts that are not pinned. If null, returns all posts.</param>
/// <returns>
/// Returns an ActionResult containing a list of Post objects that match the specified criteria.
/// Includes an X-Total header with the total count of matching posts before pagination.
/// </returns>
/// <response code="200">Returns the list of posts matching the criteria.</response>
[HttpGet] [HttpGet]
[ProducesResponseType(StatusCodes.Status200OK, Type = typeof(List<SnPost>))] [ProducesResponseType(StatusCodes.Status200OK, Type = typeof(List<SnPost>))]
[ProducesResponseType(StatusCodes.Status400BadRequest)] [ProducesResponseType(StatusCodes.Status400BadRequest)]

View File

@@ -25,8 +25,7 @@ public class ActivityController(TimelineService acts) : ControllerBase
public async Task<ActionResult<List<SnTimelineEvent>>> ListEvents( public async Task<ActionResult<List<SnTimelineEvent>>> ListEvents(
[FromQuery] string? cursor, [FromQuery] string? cursor,
[FromQuery] string? filter, [FromQuery] string? filter,
[FromQuery] int take = 20, [FromQuery] int take = 20
[FromQuery] string? debugInclude = null
) )
{ {
Instant? cursorTimestamp = null; Instant? cursorTimestamp = null;
@@ -42,13 +41,9 @@ public class ActivityController(TimelineService acts) : ControllerBase
} }
} }
var debugIncludeSet = debugInclude?.Split(',').ToHashSet() ?? new HashSet<string>();
HttpContext.Items.TryGetValue("CurrentUser", out var currentUserValue); HttpContext.Items.TryGetValue("CurrentUser", out var currentUserValue);
return currentUserValue is not Account currentUser return currentUserValue is not Account currentUser
? Ok(await acts.ListEventsForAnyone(take, cursorTimestamp, debugIncludeSet)) ? Ok(await acts.ListEventsForAnyone(take, cursorTimestamp))
: Ok( : Ok(await acts.ListEvents(take, cursorTimestamp, currentUser, filter));
await acts.ListEvents(take, cursorTimestamp, currentUser, filter, debugIncludeSet)
);
} }
} }

View File

@@ -32,14 +32,9 @@ public class TimelineService(
return performanceWeight / Math.Pow(normalizedTime + 1.0, 1.2); return performanceWeight / Math.Pow(normalizedTime + 1.0, 1.2);
} }
public async Task<List<SnTimelineEvent>> ListEventsForAnyone( public async Task<List<SnTimelineEvent>> ListEventsForAnyone(int take, Instant? cursor)
int take,
Instant? cursor,
HashSet<string>? debugInclude = null
)
{ {
var activities = new List<SnTimelineEvent>(); var activities = new List<SnTimelineEvent>();
debugInclude ??= new HashSet<string>();
// Get and process posts // Get and process posts
var publicRealms = await rs.GetPublicRealms(); var publicRealms = await rs.GetPublicRealms();
@@ -60,7 +55,7 @@ public class TimelineService(
// Randomly insert a discovery activity before some posts // Randomly insert a discovery activity before some posts
if (random.NextDouble() < 0.15) if (random.NextDouble() < 0.15)
{ {
var discovery = await MaybeGetDiscoveryActivity(debugInclude, cursor: cursor); var discovery = await MaybeGetDiscoveryActivity(cursor: cursor);
if (discovery != null) if (discovery != null)
interleaved.Add(discovery); interleaved.Add(discovery);
} }
@@ -80,12 +75,10 @@ public class TimelineService(
int take, int take,
Instant? cursor, Instant? cursor,
Account currentUser, Account currentUser,
string? filter = null, string? filter = null
HashSet<string>? debugInclude = null
) )
{ {
var activities = new List<SnTimelineEvent>(); var activities = new List<SnTimelineEvent>();
debugInclude ??= new HashSet<string>();
// Get user's friends and publishers // Get user's friends and publishers
var friendsResponse = await accounts.ListFriendsAsync( var friendsResponse = await accounts.ListFriendsAsync(
@@ -126,7 +119,7 @@ public class TimelineService(
{ {
if (random.NextDouble() < 0.15) if (random.NextDouble() < 0.15)
{ {
var discovery = await MaybeGetDiscoveryActivity(debugInclude, cursor: cursor); var discovery = await MaybeGetDiscoveryActivity(cursor: cursor);
if (discovery != null) if (discovery != null)
interleaved.Add(discovery); interleaved.Add(discovery);
} }
@@ -142,21 +135,16 @@ public class TimelineService(
return activities; return activities;
} }
private async Task<SnTimelineEvent?> MaybeGetDiscoveryActivity( private async Task<SnTimelineEvent?> MaybeGetDiscoveryActivity(Instant? cursor)
HashSet<string> debugInclude,
Instant? cursor
)
{ {
if (cursor != null)
return null;
var options = new List<Func<Task<SnTimelineEvent?>>>(); var options = new List<Func<Task<SnTimelineEvent?>>>();
if (debugInclude.Contains("realms") || Random.Shared.NextDouble() < 0.2) if (Random.Shared.NextDouble() < 0.5)
options.Add(() => GetRealmDiscoveryActivity()); options.Add(() => GetRealmDiscoveryActivity());
if (debugInclude.Contains("publishers") || Random.Shared.NextDouble() < 0.2) if (Random.Shared.NextDouble() < 0.5)
options.Add(() => GetPublisherDiscoveryActivity()); options.Add(() => GetPublisherDiscoveryActivity());
if (debugInclude.Contains("articles") || Random.Shared.NextDouble() < 0.2) if (Random.Shared.NextDouble() < 0.5)
options.Add(() => GetArticleDiscoveryActivity()); options.Add(() => GetArticleDiscoveryActivity());
if (debugInclude.Contains("shuffledPosts") || Random.Shared.NextDouble() < 0.2) if (Random.Shared.NextDouble() < 0.5)
options.Add(() => GetShuffledPostsActivity()); options.Add(() => GetShuffledPostsActivity());
if (options.Count == 0) if (options.Count == 0)
return null; return null;

View File

@@ -0,0 +1,18 @@
namespace DysonNetwork.Zone.Customization;
// PostPage.Config -> filter
public class PostPageFilterConfig
{
public List<int> Types { get; set; }
public string? PubName { get; set; }
public string? OrderBy { get; set; }
public bool OrderDesc { get; set; } = true;
}
// PostPage.Config -> layout
public class PostPageLayoutConfig
{
public string? Title { get; set; }
public string? Description { get; set; }
public bool ShowPub { get; set; } = true;
}

View File

@@ -0,0 +1,156 @@
// <auto-generated />
using System;
using System.Collections.Generic;
using DysonNetwork.Shared.Models;
using DysonNetwork.Zone;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using NodaTime;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace DysonNetwork.Zone.Migrations
{
[DbContext(typeof(AppDatabase))]
[Migration("20251210104942_AddSiteGlobalConfig")]
partial class AddSiteGlobalConfig
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "9.0.11")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("DysonNetwork.Shared.Models.SnPublicationPage", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
b.Property<Dictionary<string, object>>("Config")
.IsRequired()
.HasColumnType("jsonb")
.HasColumnName("config");
b.Property<Instant>("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("created_at");
b.Property<Instant?>("DeletedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("deleted_at");
b.Property<string>("Path")
.IsRequired()
.HasMaxLength(8192)
.HasColumnType("character varying(8192)")
.HasColumnName("path");
b.Property<Guid>("SiteId")
.HasColumnType("uuid")
.HasColumnName("site_id");
b.Property<int>("Type")
.HasColumnType("integer")
.HasColumnName("type");
b.Property<Instant>("UpdatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("updated_at");
b.HasKey("Id")
.HasName("pk_publication_pages");
b.HasIndex("SiteId")
.HasDatabaseName("ix_publication_pages_site_id");
b.ToTable("publication_pages", (string)null);
});
modelBuilder.Entity("DysonNetwork.Shared.Models.SnPublicationSite", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
b.Property<Guid>("AccountId")
.HasColumnType("uuid")
.HasColumnName("account_id");
b.Property<PublicationSiteConfig>("Config")
.IsRequired()
.HasColumnType("jsonb")
.HasColumnName("config");
b.Property<Instant>("CreatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("created_at");
b.Property<Instant?>("DeletedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("deleted_at");
b.Property<string>("Description")
.HasMaxLength(8192)
.HasColumnType("character varying(8192)")
.HasColumnName("description");
b.Property<int>("Mode")
.HasColumnType("integer")
.HasColumnName("mode");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(4096)
.HasColumnType("character varying(4096)")
.HasColumnName("name");
b.Property<Guid>("PublisherId")
.HasColumnType("uuid")
.HasColumnName("publisher_id");
b.Property<string>("Slug")
.IsRequired()
.HasMaxLength(4096)
.HasColumnType("character varying(4096)")
.HasColumnName("slug");
b.Property<Instant>("UpdatedAt")
.HasColumnType("timestamp with time zone")
.HasColumnName("updated_at");
b.HasKey("Id")
.HasName("pk_publication_sites");
b.ToTable("publication_sites", (string)null);
});
modelBuilder.Entity("DysonNetwork.Shared.Models.SnPublicationPage", b =>
{
b.HasOne("DysonNetwork.Shared.Models.SnPublicationSite", "Site")
.WithMany("Pages")
.HasForeignKey("SiteId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_publication_pages_publication_sites_site_id");
b.Navigation("Site");
});
modelBuilder.Entity("DysonNetwork.Shared.Models.SnPublicationSite", b =>
{
b.Navigation("Pages");
});
#pragma warning restore 612, 618
}
}
}

View File

@@ -0,0 +1,30 @@
using DysonNetwork.Shared.Models;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace DysonNetwork.Zone.Migrations
{
/// <inheritdoc />
public partial class AddSiteGlobalConfig : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<PublicationSiteConfig>(
name: "config",
table: "publication_sites",
type: "jsonb",
nullable: false,
defaultValue: new PublicationSiteConfig());
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "config",
table: "publication_sites");
}
}
}

View File

@@ -1,6 +1,7 @@
// <auto-generated /> // <auto-generated />
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using DysonNetwork.Shared.Models;
using DysonNetwork.Zone; using DysonNetwork.Zone;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
@@ -82,6 +83,11 @@ namespace DysonNetwork.Zone.Migrations
.HasColumnType("uuid") .HasColumnType("uuid")
.HasColumnName("account_id"); .HasColumnName("account_id");
b.Property<PublicationSiteConfig>("Config")
.IsRequired()
.HasColumnType("jsonb")
.HasColumnName("config");
b.Property<Instant>("CreatedAt") b.Property<Instant>("CreatedAt")
.HasColumnType("timestamp with time zone") .HasColumnType("timestamp with time zone")
.HasColumnName("created_at"); .HasColumnName("created_at");

View File

@@ -0,0 +1,8 @@
@model DynamicPage
@{
Layout = "_LayoutContained";
}
<div class="dynamic-content">
@Html.Raw(Model.Html)
</div>

View File

@@ -0,0 +1,8 @@
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace DysonNetwork.Zone.Pages.Dynamic;
public class DynamicPage : PageModel
{
public string Html { get; set; } = "";
}

View File

@@ -2,10 +2,9 @@
@model DysonNetwork.Zone.Pages.PostsModel @model DysonNetwork.Zone.Pages.PostsModel
@{ @{
Layout = "_LayoutContained"; Layout = "_LayoutContained";
const string defaultAvatar = "https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp";
var pageTitle = "Posts"; var pageTitle = Model.LayoutConfig?.Title ?? "Posts";
var pageDescription = "A collection of posts."; var pageDescription = Model.LayoutConfig?.Description ?? "A collection of posts.";
string? ogImageUrl = null; string? ogImageUrl = null;
var canonicalUrl = $"{Request.Scheme}://{Request.Host}{Request.Path}{Request.QueryString}"; var canonicalUrl = $"{Request.Scheme}://{Request.Host}{Request.Path}{Request.QueryString}";
var siteName = Model.Site?.Name ?? "Solar Network"; var siteName = Model.Site?.Name ?? "Solar Network";
@@ -48,7 +47,7 @@
<div class="container mx-auto px-8 py-8"> <div class="container mx-auto px-8 py-8">
<h1 class="text-3xl font-bold mb-8 px-5"> <h1 class="text-3xl font-bold mb-8 px-5">
<span class="mdi mdi-note-text-outline"></span> Posts <span class="mdi mdi-note-text-outline"></span> @pageTitle
</h1> </h1>
<div class="w-full grid grid-cols-3 gap-4"> <div class="w-full grid grid-cols-3 gap-4">
@@ -75,8 +74,8 @@
<div class="join"> <div class="join">
@{ @{
const int maxPagesToShow = 5; // e.g., 2 before, current, 2 after const int maxPagesToShow = 5; // e.g., 2 before, current, 2 after
var startPage = Math.Max(1, Model.CurrentPage - (maxPagesToShow / 2)); var startPage = Math.Max(1, Model.Index - (maxPagesToShow / 2));
var endPage = Math.Min(Model.TotalPages, Model.CurrentPage + (maxPagesToShow / 2)); var endPage = Math.Min(Model.TotalPages, Model.Index + (maxPagesToShow / 2));
// Adjust startPage and endPage to ensure exactly maxPagesToShow are shown if possible // Adjust startPage and endPage to ensure exactly maxPagesToShow are shown if possible
if (endPage - startPage + 1 < maxPagesToShow) if (endPage - startPage + 1 < maxPagesToShow)
@@ -92,15 +91,14 @@
} }
} }
<a asp-page="/Posts" <a href="/posts?index=@(Model.Index > 1 ? Model.Index - 1 : 1)"
asp-route-currentPage="@(Model.CurrentPage > 1 ? Model.CurrentPage - 1 : 1)" class="join-item btn @(Model.Index == 1 ? "btn-disabled" : "")">«</a>
class="join-item btn @(Model.CurrentPage == 1 ? "btn-disabled" : "")">«</a>
@if (startPage > 1) @if (startPage > 1)
{ {
<a asp-page="/Posts" <a asp-page="/Posts"
asp-route-currentPage="1" asp-route-currentPage="1"
class="join-item btn @(1 == Model.CurrentPage ? "btn-active" : "")"> class="join-item btn @(1 == Model.Index ? "btn-active" : "")">
1 1
</a> </a>
@if (startPage > 2) @if (startPage > 2)
@@ -111,11 +109,8 @@
@for (var idx = startPage; idx <= endPage; idx++) @for (var idx = startPage; idx <= endPage; idx++)
{ {
var pageIdx = idx; <a href="/posts?index=@(idx)" class="join-item btn @(idx == Model.Index ? "btn-active" : "")">
<a asp-page="/Posts" @idx
asp-route-currentPage="@pageIdx"
class="join-item btn @(pageIdx == Model.CurrentPage ? "btn-active" : "")">
@pageIdx
</a> </a>
} }
@@ -125,16 +120,14 @@
{ {
<span class="join-item btn btn-disabled">...</span> <span class="join-item btn btn-disabled">...</span>
} }
<a asp-page="/Posts" <a href="/posts?index=@(Model.TotalPages)"
asp-route-currentPage="@Model.TotalPages" class="join-item btn @(Model.TotalPages == Model.Index ? "btn-active" : "")">
class="join-item btn @(Model.TotalPages == Model.CurrentPage ? "btn-active" : "")">
@Model.TotalPages @Model.TotalPages
</a> </a>
} }
<a asp-page="/Posts" <a href="/posts?index=@(Model.Index < Model.TotalPages ? Model.Index + 1 : Model.TotalPages)"
asp-route-currentPage="@(Model.CurrentPage < Model.TotalPages ? Model.CurrentPage + 1 : Model.TotalPages)" class="join-item btn @(Model.Index == Model.TotalPages ? "btn-disabled" : "")">»</a>
class="join-item btn @(Model.CurrentPage == Model.TotalPages ? "btn-disabled" : "")">»</a>
</div> </div>
</div> </div>
} }

View File

@@ -1,6 +1,7 @@
using DysonNetwork.Shared.Models; using DysonNetwork.Shared.Models;
using DysonNetwork.Shared.Proto; using DysonNetwork.Shared.Proto;
using DysonNetwork.Shared.Registry; using DysonNetwork.Shared.Registry;
using DysonNetwork.Zone.Customization;
using DysonNetwork.Zone.Publication; using DysonNetwork.Zone.Publication;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
// Add this using statement // Add this using statement
@@ -15,34 +16,54 @@ public class PostsModel(
MarkdownConverter markdownConverter MarkdownConverter markdownConverter
) : PageModel ) : PageModel
{ {
[FromQuery] public bool ShowAll { get; set; } = false;
public SnPublicationSite? Site { get; set; } public SnPublicationSite? Site { get; set; }
public SnPublisher? Publisher { get; set; } public SnPublisher? Publisher { get; set; }
public List<SnPost> Posts { get; set; } = []; public List<SnPost> Posts { get; set; } = [];
public int TotalCount { get; set; } public int TotalCount { get; set; }
public int CurrentPage { get; set; } public int Index { get; set; }
public int PageSize { get; set; } = 10; public int PageSize { get; set; } = 10;
public int TotalPages => (int)Math.Ceiling(TotalCount / (double)PageSize); public int TotalPages => (int)Math.Ceiling(TotalCount / (double)PageSize);
public async Task OnGetAsync(int currentPage = 1) public PostPageFilterConfig? FilterConfig { get; set; }
{ public PostPageLayoutConfig? LayoutConfig { get; set; }
Site = HttpContext.Items[PublicationSiteMiddleware.SiteContextKey] as SnPublicationSite;
CurrentPage = currentPage;
Publisher = await rps.GetPublisher(id: Site!.PublisherId.ToString()); public async Task OnGetAsync(int index = 1)
{
FilterConfig = HttpContext.Items["PostPage_FilterConfig"] as PostPageFilterConfig;
LayoutConfig = HttpContext.Items["PostPage_LayoutConfig"] as PostPageLayoutConfig;
Site = HttpContext.Items[PublicationSiteMiddleware.SiteContextKey] as SnPublicationSite;
Index = index;
Publisher = FilterConfig?.PubName is not null
? await rps.GetPublisher(FilterConfig.PubName)
: await rps.GetPublisher(id: Site!.PublisherId.ToString());
var request = new ListPostsRequest var request = new ListPostsRequest
{ {
OrderBy = "date", OrderBy = FilterConfig?.OrderBy,
OrderDesc = true, OrderDesc = FilterConfig?.OrderDesc ?? true,
PageSize = PageSize, PageSize = PageSize,
PageToken = ((CurrentPage - 1) * PageSize).ToString(), PageToken = ((Index - 1) * PageSize).ToString(),
PublisherId = Site!.PublisherId.ToString() PublisherId = Publisher!.Id.ToString()
}; };
if (!ShowAll) request.Types_.Add(DysonNetwork.Shared.Proto.PostType.Article); if (FilterConfig?.Types is not null)
{
foreach (var type in FilterConfig.Types)
{
request.Types_.Add(type switch
{
0 => DysonNetwork.Shared.Proto.PostType.Moment,
1 => DysonNetwork.Shared.Proto.PostType.Article,
_ => DysonNetwork.Shared.Proto.PostType.Unspecified,
});
}
}
else
{
request.Types_.Add(DysonNetwork.Shared.Proto.PostType.Article);
}
var response = await postClient.ListPostsAsync(request); var response = await postClient.ListPostsAsync(request);

View File

@@ -1,5 +1,6 @@
@using DysonNetwork.Zone.Publication @using DysonNetwork.Zone.Publication
@using DysonNetwork.Shared.Models @using DysonNetwork.Shared.Models
@using Microsoft.IdentityModel.Tokens
@{ @{
Layout = "_Layout"; Layout = "_Layout";
var site = Context.Items[PublicationSiteMiddleware.SiteContextKey] as SnPublicationSite; var site = Context.Items[PublicationSiteMiddleware.SiteContextKey] as SnPublicationSite;
@@ -8,13 +9,26 @@
<div class="navbar backdrop-blur-md bg-white/1 shadow-xl px-5"> <div class="navbar backdrop-blur-md bg-white/1 shadow-xl px-5">
<div class="flex-1"> <div class="flex-1">
<a class="btn btn-ghost text-xl" asp-page="/Index">@siteDisplayName</a> <a class="btn btn-ghost text-xl" href="/">@siteDisplayName</a>
</div> </div>
<div class="flex-none"> <div class="flex-none">
<ul class="menu menu-horizontal px-1"> @if (site?.Config.NavItems is null || site.Config.NavItems.IsNullOrEmpty())
<li><a asp-page="/Posts">Posts</a></li> {
<li><a asp-page="/About">About</a></li> @*Use preset navs*@
</ul> <ul class="menu menu-horizontal px-1">
<li><a href="/posts">Posts</a></li>
<li><a href="/about">About</a></li>
</ul>
}
else
{
<ul class="menu menu-horizontal px-1">
@foreach (var item in site.Config.NavItems)
{
<li><a href="@item.Href">@item.Label</a></li>
}
</ul>
}
</div> </div>
</div> </div>
@@ -31,6 +45,11 @@
{ {
@await RenderSectionAsync("Head", required: false) @await RenderSectionAsync("Head", required: false)
@if (site?.Config.StyleOverride is not null)
{
<style>@(site.Config.StyleOverride)</style>
}
<style> <style>
.navbar { .navbar {
height: 64px; height: 64px;

View File

@@ -80,8 +80,7 @@
<div class="text-sm text-base-content/60"> <div class="text-sm text-base-content/60">
Posted on @Model.CreatedAt.ToDateTimeOffset().ToString("yyyy-MM-dd") Posted on @Model.CreatedAt.ToDateTimeOffset().ToString("yyyy-MM-dd")
</div> </div>
<a asp-page="/Posts/Details" asp-route-slug="@(Model.Slug ?? Model.Id.ToString())" <a href="/p/@(Model.Slug ?? Model.Id.ToString())"class="btn btn-sm btn-ghost btn-circle">
class="btn btn-sm btn-ghost btn-circle">
<span class="mdi mdi-arrow-right text-lg"></span> <span class="mdi mdi-arrow-right text-lg"></span>
</a> </a>
</div> </div>

View File

@@ -59,7 +59,8 @@ public class PublicationSiteController(
[HttpPost("{pubName}")] [HttpPost("{pubName}")]
[Authorize] [Authorize]
public async Task<ActionResult<SnPublicationSite>> CreateSite([FromRoute] string pubName, [FromBody] PublicationSiteRequest request) public async Task<ActionResult<SnPublicationSite>> CreateSite([FromRoute] string pubName,
[FromBody] PublicationSiteRequest request)
{ {
if (HttpContext.Items["CurrentUser"] is not Shared.Proto.Account currentUser) if (HttpContext.Items["CurrentUser"] is not Shared.Proto.Account currentUser)
return Unauthorized(); return Unauthorized();
@@ -75,6 +76,7 @@ public class PublicationSiteController(
Name = request.Name, Name = request.Name,
Description = request.Description, Description = request.Description,
PublisherId = publisher.Id, PublisherId = publisher.Id,
Config = request.Config ?? new PublicationSiteConfig(),
AccountId = accountId AccountId = accountId
}; };
@@ -96,7 +98,8 @@ public class PublicationSiteController(
[HttpPatch("{pubName}/{slug}")] [HttpPatch("{pubName}/{slug}")]
[Authorize] [Authorize]
public async Task<ActionResult<SnPublicationSite>> UpdateSite([FromRoute] string pubName, string slug, [FromBody] PublicationSiteRequest request) public async Task<ActionResult<SnPublicationSite>> UpdateSite([FromRoute] string pubName, string slug,
[FromBody] PublicationSiteRequest request)
{ {
if (HttpContext.Items["CurrentUser"] is not Shared.Proto.Account currentUser) if (HttpContext.Items["CurrentUser"] is not Shared.Proto.Account currentUser)
return Unauthorized(); return Unauthorized();
@@ -113,6 +116,7 @@ public class PublicationSiteController(
site.Slug = request.Slug; site.Slug = request.Slug;
site.Name = request.Name; site.Name = request.Name;
site.Description = request.Description ?? site.Description; site.Description = request.Description ?? site.Description;
site.Config = request.Config ?? site.Config;
try try
{ {
@@ -153,18 +157,10 @@ public class PublicationSiteController(
return NoContent(); return NoContent();
} }
[HttpGet("site/{slug}/page")]
public async Task<ActionResult<SnPublicationPage>> RenderPage(string slug, [FromQuery] string path = "/")
{
var page = await publicationService.RenderPage(slug, path);
if (page == null)
return NotFound();
return Ok(page);
}
[HttpGet("{pubName}/{siteSlug}/pages")] [HttpGet("{pubName}/{siteSlug}/pages")]
[Authorize] [Authorize]
public async Task<ActionResult<List<SnPublicationPage>>> ListPagesForSite([FromRoute] string pubName, [FromRoute] string siteSlug) public async Task<ActionResult<List<SnPublicationPage>>> ListPagesForSite([FromRoute] string pubName,
[FromRoute] string siteSlug)
{ {
var site = await publicationService.GetSiteBySlug(siteSlug); var site = await publicationService.GetSiteBySlug(siteSlug);
if (site == null) return NotFound(); if (site == null) return NotFound();
@@ -187,7 +183,8 @@ public class PublicationSiteController(
[HttpPost("{pubName}/{siteSlug}/pages")] [HttpPost("{pubName}/{siteSlug}/pages")]
[Authorize] [Authorize]
public async Task<ActionResult<SnPublicationPage>> CreatePage([FromRoute] string pubName, [FromRoute] string siteSlug, [FromBody] PublicationPageRequest request) public async Task<ActionResult<SnPublicationPage>> CreatePage([FromRoute] string pubName,
[FromRoute] string siteSlug, [FromBody] PublicationPageRequest request)
{ {
if (HttpContext.Items["CurrentUser"] is not Shared.Proto.Account currentUser) if (HttpContext.Items["CurrentUser"] is not Shared.Proto.Account currentUser)
return Unauthorized(); return Unauthorized();
@@ -280,6 +277,7 @@ public class PublicationSiteController(
[MaxLength(4096)] public string Slug { get; set; } = null!; [MaxLength(4096)] public string Slug { get; set; } = null!;
[MaxLength(4096)] public string Name { get; set; } = null!; [MaxLength(4096)] public string Name { get; set; } = null!;
[MaxLength(8192)] public string? Description { get; set; } [MaxLength(8192)] public string? Description { get; set; }
public PublicationSiteConfig? Config { get; set; }
} }
public class PublicationPageRequest public class PublicationPageRequest

View File

@@ -1,5 +1,15 @@
using System.Text.Json; using System.Text.Json;
using DysonNetwork.Shared.Models; using DysonNetwork.Shared.Models;
using DysonNetwork.Shared.Proto;
using DysonNetwork.Zone.Customization;
using DysonNetwork.Zone.Pages.Dynamic;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Abstractions;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.Razor;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.StaticFiles; using Microsoft.AspNetCore.StaticFiles;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
@@ -9,7 +19,13 @@ public class PublicationSiteMiddleware(RequestDelegate next)
{ {
public const string SiteContextKey = "PubSite"; public const string SiteContextKey = "PubSite";
public async Task InvokeAsync(HttpContext context, AppDatabase db, PublicationSiteManager psm) public async Task InvokeAsync(
HttpContext context,
AppDatabase db,
PublicationSiteManager psm,
IRazorViewEngine viewEngine,
ITempDataProvider tempData
)
{ {
var siteNameValue = context.Request.Headers["X-SiteName"].ToString(); var siteNameValue = context.Request.Headers["X-SiteName"].ToString();
var currentPath = context.Request.Path.Value ?? ""; var currentPath = context.Request.Path.Value ?? "";
@@ -21,7 +37,8 @@ public class PublicationSiteMiddleware(RequestDelegate next)
} }
var site = await db.PublicationSites var site = await db.PublicationSites
.FirstOrDefaultAsync(s => EF.Functions.ILike(s.Slug, siteNameValue)); .FirstOrDefaultAsync(s => EF.Functions.ILike(s.Slug, siteNameValue)
);
if (site == null) if (site == null)
{ {
await next(context); await next(context);
@@ -38,13 +55,43 @@ public class PublicationSiteMiddleware(RequestDelegate next)
{ {
case PublicationPageType.HtmlPage case PublicationPageType.HtmlPage
when page.Config.TryGetValue("html", out var html) && html is JsonElement content: when page.Config.TryGetValue("html", out var html) && html is JsonElement content:
context.Response.ContentType = "text/html"; if (site.Mode == PublicationSiteMode.FullyManaged)
await context.Response.WriteAsync(content.ToString()); {
context.Items["PublicationHtmlContent"] = content.ToString();
var layoutedHtml = await RenderViewAsync(
context,
viewEngine,
tempData,
"/Pages/Dynamic/DynamicPage.cshtml",
new DynamicPage { Html = content.ToString() }
);
context.Response.ContentType = "text/html";
await context.Response.WriteAsync(layoutedHtml);
}
else
{
context.Response.ContentType = "text/html";
await context.Response.WriteAsync(content.ToString());
}
return; return;
case PublicationPageType.Redirect case PublicationPageType.Redirect
when page.Config.TryGetValue("target", out var tgt) && tgt is JsonElement redirectUrl: when page.Config.TryGetValue("target", out var tgt) && tgt is JsonElement redirectUrl:
context.Response.Redirect(redirectUrl.ToString()); context.Response.Redirect(redirectUrl.ToString());
return; return;
case PublicationPageType.PostPage:
PostPageFilterConfig? filterConfig = null;
if (page.Config.TryGetValue("filter", out var filter) && filter is JsonElement filterJson)
filterConfig = filterJson.Deserialize<PostPageFilterConfig>(GrpcTypeHelper.SerializerOptions);
PostPageLayoutConfig? layoutConfig = null;
if (page.Config.TryGetValue("layout", out var layout) && layout is JsonElement layoutJson)
layoutConfig = layoutJson.Deserialize<PostPageLayoutConfig>(GrpcTypeHelper.SerializerOptions);
context.Items["PostPage_LayoutConfig"] = layoutConfig;
context.Items["PostPage_FilterConfig"] = filterConfig;
context.Request.Path = "/Posts";
await next(context);
return;
default:
throw new ArgumentOutOfRangeException();
} }
} }
@@ -85,4 +132,51 @@ public class PublicationSiteMiddleware(RequestDelegate next)
await next(context); await next(context);
} }
private async Task<string> RenderViewAsync(
HttpContext context,
IRazorViewEngine engine,
ITempDataProvider tempDataProvider,
string viewPath,
object model)
{
var endpointFeature = context.Features.Get<IEndpointFeature>();
var endpoint = endpointFeature?.Endpoint;
var routeData = context.GetRouteData();
var actionContext = new ActionContext(
context,
routeData,
new ActionDescriptor()
);
await using var sw = new StringWriter();
var viewResult = engine.GetView(null, viewPath, true);
if (!viewResult.Success)
throw new FileNotFoundException($"View '{viewPath}' not found.");
var viewData = new ViewDataDictionary(
new EmptyModelMetadataProvider(),
new ModelStateDictionary())
{
Model = model
};
var tempData = new TempDataDictionary(context, tempDataProvider);
var viewContext = new ViewContext(
actionContext,
viewResult.View,
viewData,
tempData,
sw,
new HtmlHelperOptions()
);
await viewResult.View.RenderAsync(viewContext);
return sw.ToString();
}
} }

View File

@@ -122,6 +122,8 @@
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AOk_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F01d30b32e2ff422cb80129ca2a441c4242600_003F3b_003F237bf104_003FOk_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AOk_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F01d30b32e2ff422cb80129ca2a441c4242600_003F3b_003F237bf104_003FOk_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AOpenApiInfo_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FSourcesCache_003Ffcedb617b237dc31e998d31e01f101e8441948433938518c5f20cec1a845c1_003FOpenApiInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AOpenApiInfo_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FSourcesCache_003Ffcedb617b237dc31e998d31e01f101e8441948433938518c5f20cec1a845c1_003FOpenApiInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AOptionsConfigurationServiceCollectionExtensions_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F6622dea924b14dc7aa3ee69d7c84e5735000_003Fe0_003F024ba0b7_003FOptionsConfigurationServiceCollectionExtensions_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AOptionsConfigurationServiceCollectionExtensions_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F6622dea924b14dc7aa3ee69d7c84e5735000_003Fe0_003F024ba0b7_003FOptionsConfigurationServiceCollectionExtensions_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APageActionDescriptor_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F2be344df4d74430c8cfa6e1fd83191ea7b110_003Fc2_003F5bba515a_003FPageActionDescriptor_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APageLoader_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F2be344df4d74430c8cfa6e1fd83191ea7b110_003F9e_003Ff8e508b5_003FPageLoader_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APageModel_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F2be344df4d74430c8cfa6e1fd83191ea7b110_003Ff3_003Fd92c30ee_003FPageModel_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APageModel_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F2be344df4d74430c8cfa6e1fd83191ea7b110_003Ff3_003Fd92c30ee_003FPageModel_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APathStringTransform_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fbf3f51607a3e4e76b5b91640cd7409195c430_003Fc5_003Fc4220f9f_003FPathStringTransform_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APathStringTransform_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fbf3f51607a3e4e76b5b91640cd7409195c430_003Fc5_003Fc4220f9f_003FPathStringTransform_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APathTransformExtensions_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fbf3f51607a3e4e76b5b91640cd7409195c430_003Fd9_003Faff65774_003FPathTransformExtensions_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APathTransformExtensions_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fbf3f51607a3e4e76b5b91640cd7409195c430_003Fd9_003Faff65774_003FPathTransformExtensions_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
@@ -155,6 +157,9 @@
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASourceCustom_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fdaa8d9c408cd4b4286bbef7e35f1a42e31c00_003F45_003F5839ca6c_003FSourceCustom_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASourceCustom_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fdaa8d9c408cd4b4286bbef7e35f1a42e31c00_003F45_003F5839ca6c_003FSourceCustom_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AStackFrameIterator_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F3bef61b8a21d4c8e96872ecdd7782fa0e55000_003F7a_003F870020d0_003FStackFrameIterator_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AStackFrameIterator_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F3bef61b8a21d4c8e96872ecdd7782fa0e55000_003F7a_003F870020d0_003FStackFrameIterator_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AStackFrameIterator_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fb6f0571a6bc744b0b551fd4578292582e54c00_003Fdf_003F3fcdc4d2_003FStackFrameIterator_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AStackFrameIterator_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fb6f0571a6bc744b0b551fd4578292582e54c00_003Fdf_003F3fcdc4d2_003FStackFrameIterator_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AStatusCodePagesExtensions_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Ffe98808dec0c44c18de3f97b316370d478f08_003F20_003F1750deb2_003FStatusCodePagesExtensions_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AStatusCodePagesMiddleware_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Ffe98808dec0c44c18de3f97b316370d478f08_003F0b_003Ff955e54b_003FStatusCodePagesMiddleware_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AStatusCodePagesOptions_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Ffe98808dec0c44c18de3f97b316370d478f08_003F01_003F859257a9_003FStatusCodePagesOptions_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AStatusCodeResult_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F0b5acdd962e549369896cece0026e556214600_003F7c_003F8b7572ae_003FStatusCodeResult_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AStatusCodeResult_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F0b5acdd962e549369896cece0026e556214600_003F7c_003F8b7572ae_003FStatusCodeResult_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AStreamConfig_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F7140aa4493a2490fb306b1e68b5d533c98200_003Fbc_003Fccf922ff_003FStreamConfig_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AStreamConfig_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F7140aa4493a2490fb306b1e68b5d533c98200_003Fbc_003Fccf922ff_003FStreamConfig_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AStructuredTransformer_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fbf3f51607a3e4e76b5b91640cd7409195c430_003F5c_003F73acd7b4_003FStructuredTransformer_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AStructuredTransformer_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fbf3f51607a3e4e76b5b91640cd7409195c430_003F5c_003F73acd7b4_003FStructuredTransformer_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>