SocialPub/PrivaPub.ClientModels/User/Avatar/ViewAvatarSettings.cs
2023-02-19 00:43:43 +01:00

30 lines
1.2 KiB
C#

using PrivaPub.ClientModels.Resources;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace PrivaPub.ClientModels.User.Avatar
{
[JsonSerializable(typeof(ViewAvatarSettings))]
public class ViewAvatarSettings
{
[Required(ErrorMessageResourceName = "Required", ErrorMessageResourceType = typeof(ErrorsResource)),
Display(Name = nameof(LanguageCode), ResourceType = typeof(FieldsNameResource))]
public string LanguageCode { get; set; } = "en-GB";
public bool IsDefault { get; set; } = true;
[Range(-2, 359, ErrorMessageResourceName = nameof(Range), ErrorMessageResourceType = typeof(ErrorsResource))]
public short IconsThemeIndexColour { get; set; } = 25;
[Range(0, 359, ErrorMessageResourceName = nameof(Range), ErrorMessageResourceType = typeof(ErrorsResource))]
public short LightThemeIndexColour { get; set; } = 25;
[Range(0, 359, ErrorMessageResourceName = nameof(Range), ErrorMessageResourceType = typeof(ErrorsResource))]
public short DarkThemeIndexColour { get; set; } = 215;
public bool PreferSystemTheming { get; set; } = true;
public bool ThemeIsDarkMode { get; set; } = false;
public bool ThemeIsLightGray { get; set; } = true;
public bool ThemeIsDarkGray { get; set; } = false;
}
}