Moves the file explorer styling and layout into the bundled themes

This commit is contained in:
BinaryAlley committed 2026-08-29 16:28:58 +03:00
1 parent 3f69693332
commit a32f80337b
72 files changed
+1577 -1682

No files matched your search

@@ -0,0 +1,22 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Presentation.Web.Common.DTO.Themes;
/// <summary>
/// Data transfer object for the runtime configuration of the file system browser component.
/// </summary>
/// <param name="ServerBasePath">The base URL of the remote API used for thumbnail retrieval.</param>
/// <param name="ClientBasePath">The base URL of the Web application used for file system API calls.</param>
/// <param name="Path">The initial path displayed by the file system browser.</param>
/// <param name="ViewMode">The initial view mode of the file system browser.</param>
/// <param name="IconSize">The initial icon size of the file system browser.</param>
[DebuggerDisplay("Path: {Path}, ViewMode: {ViewMode}")]
public sealed record ThemeFileSystemBrowserConfigurationDto(
string ServerBasePath,
string ClientBasePath,
string Path,
string ViewMode,
string IconSize
);
@@ -0,0 +1,29 @@
#region ========================================================================= USING =====================================================================================
using System.Collections.Generic;
using System.Diagnostics;
#endregion
namespace Lumina.Presentation.Web.Common.DTO.Themes;
/// <summary>
/// Data transfer object for the model available to the themed file system browser template.
/// </summary>
/// <param name="AppBase">The absolute base URL of the Web application, used to reference the application scripts from the theme template.</param>
/// <param name="AssetBase">The base URL of the theme assets, used by the theme template to reference its own assets.</param>
/// <param name="IconBaseUrl">The base URL of the file type icons of the theme.</param>
/// <param name="FileIconsUrl">The URL of the theme file icons mapping, mapping file extensions to icon paths.</param>
/// <param name="TreeNodeTemplate">The raw template source of the tree view node, rendered client side for each node.</param>
/// <param name="ExplorerItemTemplate">The raw template source of the explorer item, rendered client side for each file system entry.</param>
/// <param name="PathSegmentTemplate">The raw template source of the address bar path segment, rendered client side for each segment.</param>
/// <param name="Strings">The localized strings of the file system browser, keyed by resource name.</param>
[DebuggerDisplay("AssetBase: {AssetBase}")]
public sealed record ThemeFileSystemBrowserDto(
string AppBase,
string AssetBase,
string IconBaseUrl,
string FileIconsUrl,
string TreeNodeTemplate,
string ExplorerItemTemplate,
string PathSegmentTemplate,
IReadOnlyDictionary<string, object?> Strings
);
@@ -311,6 +311,8 @@ public static class PresentationWebLayerServices
services.AddScoped<RazorViewToStringRenderer>();
services.AddScoped<ThemeNavBuilder>();
services.AddScoped<ThemeLayoutRenderer>();
services.AddScoped<ThemeFileSystemBrowserBuilder>();
services.AddScoped<ThemeFileSystemBrowserRenderer>();
services.AddScoped<IAuthorizationHandler, InitializationHandler>();
services.AddScoped<IAuthorizationHandler, RoleAuthorizationHandler>();