40 lines
1.4 KiB
C#
40 lines
1.4 KiB
C#
namespace EnvelopeGenerator.Application.Common.Dto;
|
|
|
|
/// <summary>
|
|
/// Represents a user's UI preferences stored in the distributed cache (dbo.TBDD_CACHE).
|
|
/// </summary>
|
|
public sealed record UserPreferencesDto
|
|
{
|
|
/// <summary>
|
|
/// The active DevExpress theme name.
|
|
/// Allowed values: "blazing-berry", "fluent", "purple"
|
|
/// </summary>
|
|
public string ThemeName { get; set; } = "blazing-berry";
|
|
|
|
/// <summary>
|
|
/// Whether dark mode is active.
|
|
/// Default: false (light mode).
|
|
/// </summary>
|
|
public bool IsDarkMode { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// Persisted DxGrid layout states, keyed by a stable grid identifier.
|
|
/// Example keys: "sender.active-envelopes", "sender.completed-envelopes"
|
|
/// Values are opaque JSON strings produced by DxGrid.SaveLayoutAsync().
|
|
/// </summary>
|
|
public Dictionary<string, string> GridLayouts { get; set; } = new();
|
|
|
|
/// <summary>
|
|
/// The authenticated user's display name ("{GivenName} {Surname}").
|
|
/// Populated by the server on GET responses from JWT claims.
|
|
/// NOT persisted in cache — injected at read time by UserPreferencesController.
|
|
/// Ignored on PUT requests.
|
|
/// </summary>
|
|
public string? DisplayName { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public static UserPreferencesDto Default { get; } = new UserPreferencesDto();
|
|
}
|