SocialPub/PrivaPub.ClientModels/User/Avatar/ViewAvatarSettings.cs

30 lines
1.2 KiB
C#
Raw Permalink Normal View History

2023-02-19 00:43:43 +01:00
using PrivaPub.ClientModels.Resources;
2023-02-18 08:52:17 +01:00
using System.ComponentModel.DataAnnotations;
2023-02-19 00:43:43 +01:00
using System.Text.Json.Serialization;
2023-02-18 08:52:17 +01:00
2023-02-19 00:43:43 +01:00
namespace PrivaPub.ClientModels.User.Avatar
2023-02-18 08:52:17 +01:00
{
2023-02-19 00:43:43 +01:00
[JsonSerializable(typeof(ViewAvatarSettings))]
public class ViewAvatarSettings
2023-02-18 08:52:17 +01:00
{
[Required(ErrorMessageResourceName = "Required", ErrorMessageResourceType = typeof(ErrorsResource)),
Display(Name = nameof(LanguageCode), ResourceType = typeof(FieldsNameResource))]
2023-02-19 00:43:43 +01:00
public string LanguageCode { get; set; } = "en-GB";
2023-02-18 08:52:17 +01:00
2023-02-19 00:43:43 +01:00
public bool IsDefault { get; set; } = true;
[Range(-2, 359, ErrorMessageResourceName = nameof(Range), ErrorMessageResourceType = typeof(ErrorsResource))]
public short IconsThemeIndexColour { get; set; } = 25;
2023-02-18 08:52:17 +01:00
[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;
2023-02-19 00:43:43 +01:00
public bool PreferSystemTheming { get; set; } = true;
2023-02-18 08:52:17 +01:00
public bool ThemeIsDarkMode { get; set; } = false;
2023-02-19 00:43:43 +01:00
public bool ThemeIsLightGray { get; set; } = true;
2023-02-18 08:52:17 +01:00
public bool ThemeIsDarkGray { get; set; } = false;
}
2023-02-19 00:43:43 +01:00
}