2018-11-23 07:03:32 +00:00
|
|
|
|
using Radarr.Http.REST;
|
2016-03-25 00:56:29 +00:00
|
|
|
|
using NzbDrone.Core.Configuration;
|
2014-08-05 05:44:09 +00:00
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Api.Config
|
|
|
|
|
{
|
|
|
|
|
public class UiConfigResource : RestResource
|
|
|
|
|
{
|
|
|
|
|
//Calendar
|
2015-10-03 17:45:26 +00:00
|
|
|
|
public int FirstDayOfWeek { get; set; }
|
|
|
|
|
public string CalendarWeekColumnHeader { get; set; }
|
2014-08-05 05:44:09 +00:00
|
|
|
|
|
|
|
|
|
//Dates
|
2015-10-03 17:45:26 +00:00
|
|
|
|
public string ShortDateFormat { get; set; }
|
|
|
|
|
public string LongDateFormat { get; set; }
|
|
|
|
|
public string TimeFormat { get; set; }
|
|
|
|
|
public bool ShowRelativeDates { get; set; }
|
2015-04-21 22:14:16 +00:00
|
|
|
|
|
2015-10-03 17:45:26 +00:00
|
|
|
|
public bool EnableColorImpairedMode { get; set; }
|
2014-08-05 05:44:09 +00:00
|
|
|
|
}
|
2016-03-25 00:56:29 +00:00
|
|
|
|
|
|
|
|
|
public static class UiConfigResourceMapper
|
|
|
|
|
{
|
|
|
|
|
public static UiConfigResource ToResource(IConfigService model)
|
|
|
|
|
{
|
|
|
|
|
return new UiConfigResource
|
|
|
|
|
{
|
|
|
|
|
FirstDayOfWeek = model.FirstDayOfWeek,
|
|
|
|
|
CalendarWeekColumnHeader = model.CalendarWeekColumnHeader,
|
|
|
|
|
|
|
|
|
|
ShortDateFormat = model.ShortDateFormat,
|
|
|
|
|
LongDateFormat = model.LongDateFormat,
|
|
|
|
|
TimeFormat = model.TimeFormat,
|
|
|
|
|
ShowRelativeDates = model.ShowRelativeDates,
|
|
|
|
|
|
|
|
|
|
EnableColorImpairedMode = model.EnableColorImpairedMode,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-08-05 05:44:09 +00:00
|
|
|
|
}
|