-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathClientSettingsDto.cs
More file actions
67 lines (64 loc) · 3.04 KB
/
Copy pathClientSettingsDto.cs
File metadata and controls
67 lines (64 loc) · 3.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
using ImmichFrame.Core.Interfaces;
namespace ImmichFrame.WebApi.Models;
public class ClientSettingsDto
{
public int Interval { get; set; }
public double TransitionDuration { get; set; }
public bool DownloadImages { get; set; }
public int RenewImagesDuration { get; set; }
public bool ShowClock { get; set; }
public string? ClockFormat { get; set; }
public string? ClockDateFormat { get; set; }
public bool ShowPhotoDate { get; set; }
public bool ShowProgressBar { get; set; }
public string? PhotoDateFormat { get; set; }
public bool ShowImageDesc { get; set; }
public bool ShowPeopleDesc { get; set; }
public bool ShowAlbumName { get; set; }
public bool ShowImageLocation { get; set; }
public string? ImageLocationFormat { get; set; }
public string? PrimaryColor { get; set; }
public string? SecondaryColor { get; set; }
public string Style { get; set; }
public string? BaseFontSize { get; set; }
public bool ShowWeatherDescription { get; set; }
public int TemperatureDecimalDigits { get; set; }
public string? WeatherIconUrl { get; set; }
public bool ImageZoom { get; set; }
public bool ImagePan { get; set; }
public bool ImageFill { get; set; }
public string Layout { get; set; }
public string Language { get; set; }
public static ClientSettingsDto FromGeneralSettings(IGeneralSettings generalSettings)
{
ClientSettingsDto dto = new ClientSettingsDto();
dto.Interval = generalSettings.Interval;
dto.TransitionDuration = generalSettings.TransitionDuration;
dto.DownloadImages = generalSettings.DownloadImages;
dto.RenewImagesDuration = generalSettings.RenewImagesDuration;
dto.ShowClock = generalSettings.ShowClock;
dto.ClockFormat = generalSettings.ClockFormat;
dto.ClockDateFormat = generalSettings.ClockDateFormat;
dto.ShowPhotoDate = generalSettings.ShowPhotoDate;
dto.ShowProgressBar = generalSettings.ShowProgressBar;
dto.PhotoDateFormat = generalSettings.PhotoDateFormat;
dto.ShowImageDesc = generalSettings.ShowImageDesc;
dto.ShowPeopleDesc = generalSettings.ShowPeopleDesc;
dto.ShowAlbumName = generalSettings.ShowAlbumName;
dto.ShowImageLocation = generalSettings.ShowImageLocation;
dto.ImageLocationFormat = generalSettings.ImageLocationFormat;
dto.PrimaryColor = generalSettings.PrimaryColor;
dto.SecondaryColor = generalSettings.SecondaryColor;
dto.Style = generalSettings.Style;
dto.BaseFontSize = generalSettings.BaseFontSize;
dto.ShowWeatherDescription = generalSettings.ShowWeatherDescription;
dto.TemperatureDecimalDigits = generalSettings.TemperatureDecimalDigits;
dto.WeatherIconUrl = generalSettings.WeatherIconUrl;
dto.ImageZoom = generalSettings.ImageZoom;
dto.ImagePan = generalSettings.ImagePan;
dto.ImageFill = generalSettings.ImageFill;
dto.Layout = generalSettings.Layout;
dto.Language = generalSettings.Language;
return dto;
}
}