Renders themed pages as swappable sections with path-mirrored template scopes and a Razor fallback

This commit is contained in:
BinaryAlley committed 2026-08-20 06:50:17 -07:00
1 parent f17e685239
commit e37bb3ecc6
24 files changed
+351 -187

No files matched your search

@@ -12,7 +12,7 @@ public static partial class ApiRoutes
public const string GET_THEME_SETTINGS = "/themes/settings";
public const string GET_CURRENT_THEME = "/themes/current";
public const string SET_CURRENT_THEME = "/themes/current";
public const string GET_THEME_TEMPLATE = "/themes/{themeId}/templates/{pageKey}";
public const string GET_THEME_TEMPLATE = "/themes/{themeId}/templates/{*pageKey}";
public const string GET_THEME_ASSET = "/themes/{themeId}/assets/{*assetPath}";
public const string GET_THEME_ARCHIVE = "/themes/{themeId}/archive";
public const string DELETE_THEME = "/themes/{themeId}";
@@ -16,7 +16,7 @@ using System.Threading.Tasks;
namespace Lumina.Presentation.Api.Core.Endpoints.Themes.Queries.GetThemeTemplate;
/// <summary>
/// API endpoint for the <c>/themes/{themeId}/templates/{pageKey}</c> route.
/// API endpoint for the <c>/themes/{themeId}/templates/{*pageKey}</c> route.
/// </summary>
public class GetThemeTemplateEndpoint : BaseEndpoint<GetThemeTemplateRequest, IResult>
{
@@ -56,7 +56,7 @@ public class GetThemeTemplateEndpointSummary : Summary<GetThemeTemplateEndpoint,
title = "General.Validation",
status = 422,
detail = "OneOrMoreValidationErrorsOccurred",
instance = "/api/v1/themes/{themeId}/templates/{pageKey}",
instance = "/api/v1/themes/{themeId}/templates/{*pageKey}",
errors = new Dictionary<string, string[]>
{
{
@@ -78,7 +78,7 @@ public class GetThemeTemplateEndpointSummary : Summary<GetThemeTemplateEndpoint,
title = "General.Failure",
status = 403,
detail = "ThemeNotAvailable",
instance = "/api/v1/themes/{themeId}/templates/{pageKey}",
instance = "/api/v1/themes/{themeId}/templates/{*pageKey}",
traceId = "00-a712bbf99ca8ab485f86a762ae5ae74d-b3a2eb78813b0a5d-00"
}
);
@@ -90,7 +90,7 @@ public class GetThemeTemplateEndpointSummary : Summary<GetThemeTemplateEndpoint,
title = "General.NotFound",
status = 404,
detail = "ThemeNotFound",
instance = "/api/v1/themes/{themeId}/templates/{pageKey}",
instance = "/api/v1/themes/{themeId}/templates/{*pageKey}",
traceId = "00-57d15dadd702dbd4aeb5dc9b7cee68ee-9330237dbb2ce0e5-00"
}
);
@@ -50,6 +50,14 @@
</None>
</ItemGroup>
<ItemGroup>
<Content Include="Themes\Bundled\*.zip">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<Link>themes\bundled\%(Filename)%(Extension)</Link>
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Lumina.Contracts\Lumina.Contracts.csproj" />
<ProjectReference Include="..\Lumina.Application\Lumina.Application.csproj" />