mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-02 04:01:10 +00:00
Adds the UserSettings aggregate with pagination and alpha picker preferences, keyed to a user with a dedicated UserId foreign key. Adds GET and PUT /users/me/settings API endpoints, a localized Tools > Settings page with save confirmation, the EF migration for the UserSettings table, and unit, integration and security tests.
34 lines
1.2 KiB
C#
34 lines
1.2 KiB
C#
#region ========================================================================= USING =====================================================================================
|
|
using System;
|
|
using System.Diagnostics;
|
|
#endregion
|
|
|
|
namespace Lumina.Presentation.Web.Common.Models.UsersManagement;
|
|
|
|
/// <summary>
|
|
/// Represents the settings of a user.
|
|
/// </summary>
|
|
[DebuggerDisplay("IsPaginationEnabled: {IsPaginationEnabled}; ItemsPerPage: {ItemsPerPage}")]
|
|
public class UserSettingsModel
|
|
{
|
|
/// <summary>
|
|
/// Gets or sets the unique identifier of the user that owns these settings.
|
|
/// </summary>
|
|
public Guid? UserId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets whether pagination is enabled for the user, or not.
|
|
/// </summary>
|
|
public bool IsPaginationEnabled { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// Gets or sets the number of library items displayed per page when pagination is enabled.
|
|
/// </summary>
|
|
public int ItemsPerPage { get; set; } = 48;
|
|
|
|
/// <summary>
|
|
/// Gets or sets whether the "The" prefix of library item titles is ignored by the alpha picker, or not.
|
|
/// </summary>
|
|
public bool IgnoreThePrefixForAlphaPicker { get; set; }
|
|
}
|