Adds the server-side theme repository and reworks the web theme engine onto it

This commit is contained in:
BinaryAlley committed 2026-08-19 22:50:07 -07:00
1 parent 85928f7c3c
commit bf8faba24d
136 files changed
+6942 -1197

No files matched your search

@@ -0,0 +1,19 @@
#region ========================================================================= USING =====================================================================================
using System;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Responses.Themes;
/// <summary>
/// Represents a theme archive response.
/// </summary>
/// <param name="Bytes">The bytes of the ZIP archive.</param>
/// <param name="FileName">The file name to expose when downloading the archive.</param>
/// <param name="ContentType">The MIME content type of the archive.</param>
[DebuggerDisplay("FileName: {FileName}")]
public record ThemeArchiveResponse(
byte[] Bytes,
string FileName,
string ContentType
);
@@ -0,0 +1,17 @@
#region ========================================================================= USING =====================================================================================
using System;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Responses.Themes;
/// <summary>
/// Represents a theme asset response.
/// </summary>
/// <param name="Bytes">The bytes of the asset file.</param>
/// <param name="ContentType">The MIME content type of the asset file.</param>
[DebuggerDisplay("ContentType: {ContentType}")]
public record ThemeAssetResponse(
byte[] Bytes,
string ContentType
);
@@ -0,0 +1,34 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Domain.SharedKernel.Common.Enums.Themes;
using System;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Responses.Themes;
/// <summary>
/// Represents a theme response.
/// </summary>
/// <param name="Id">The unique identifier of the theme.</param>
/// <param name="ThemeId">The manifest id of the theme, used by clients to reference it.</param>
/// <param name="Name">The display name of the theme.</param>
/// <param name="Description">The description of the theme.</param>
/// <param name="Author">The author of the theme.</param>
/// <param name="Version">The version of the theme, using semantic version form.</param>
/// <param name="PreviewPath">The path of the theme preview image, relative to the theme pack root, or <see langword="null"/> when the theme has no preview.</param>
/// <param name="InstallSource">The source the theme was installed from.</param>
/// <param name="IsCurrent">Whether the theme is the currently active one.</param>
/// <param name="InstalledAtUtc">The UTC timestamp at which the theme was installed.</param>
[DebuggerDisplay("ThemeId: {ThemeId}, Name: {Name}")]
public record ThemeResponse(
Guid Id,
string ThemeId,
string Name,
string Description,
string Author,
string Version,
string? PreviewPath,
ThemeInstallSource InstallSource,
bool? IsCurrent,
DateTime InstalledAtUtc
);
@@ -0,0 +1,19 @@
#region ========================================================================= USING =====================================================================================
using System;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Responses.Themes;
/// <summary>
/// Represents a theme settings response.
/// </summary>
/// <param name="MaxArchiveBytes">The maximum allowed size of a theme archive, in bytes.</param>
/// <param name="AllowThemeScripts">Whether theme templates may contain script elements and theme assets may include script files.</param>
/// <param name="DefaultThemeId">The identifier of the theme selected when no valid current theme is available.</param>
[DebuggerDisplay("MaxArchiveBytes: {MaxArchiveBytes}")]
public record ThemeSettingsResponse(
long MaxArchiveBytes,
bool AllowThemeScripts,
string DefaultThemeId
);
@@ -0,0 +1,17 @@
#region ========================================================================= USING =====================================================================================
using System;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Responses.Themes;
/// <summary>
/// Represents a theme template response.
/// </summary>
/// <param name="Theme">The theme the template belongs to.</param>
/// <param name="Template">The sanitized content of the template.</param>
[DebuggerDisplay("ThemeId: {Theme.ThemeId}")]
public record ThemeTemplateResponse(
ThemeResponse Theme,
string Template
);