Skip to content

Commit ee5b302

Browse files
authored
Merge pull request #467 from rgregg/rgregg-clockdateformat
Add ClockDateFormat string to format the date on the clock
2 parents a09e1d2 + 4da6fdc commit ee5b302

17 files changed

Lines changed: 21 additions & 3 deletions

File tree

ImmichFrame.Core/Interfaces/IServerSettings.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public interface IGeneralSettings
3737
public int RenewImagesDuration { get; }
3838
public bool ShowClock { get; }
3939
public string? ClockFormat { get; }
40+
public string? ClockDateFormat { get; }
4041
public bool ShowProgressBar { get; }
4142
public bool ShowPhotoDate { get; }
4243
public string? PhotoDateFormat { get; }

ImmichFrame.WebApi.Tests/Controllers/AssetControllerTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public void Setup()
4848
WeatherIconUrl = "https://openweathermap.org/img/wn/{IconId}.png",
4949
ShowClock = true,
5050
ClockFormat = "HH:mm",
51+
ClockDateFormat = "eee, MMM d",
5152
Language = "en",
5253
PhotoDateFormat = "MM/dd/yyyy", // Crucial for the NRE
5354
ImageLocationFormat = "City,State,Country",

ImmichFrame.WebApi.Tests/Resources/TestV1.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"RefreshAlbumPeopleInterval": 7,
3333
"ShowClock": true,
3434
"ClockFormat": "ClockFormat_TEST",
35+
"ClockDateFormat": "ClockDateFormat_TEST",
3536
"ShowProgressBar": true,
3637
"ShowPhotoDate": true,
3738
"PhotoDateFormat": "PhotoDateFormat_TEST",

ImmichFrame.WebApi.Tests/Resources/TestV2.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"TransitionDuration": 7.7,
1919
"ShowClock": true,
2020
"ClockFormat": "ClockFormat_TEST",
21+
"ClockDateFormat": "ClockDateFormat_TEST",
2122
"ShowProgressBar": true,
2223
"ShowPhotoDate": true,
2324
"ShowImageDesc": true,

ImmichFrame.WebApi.Tests/Resources/TestV2.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ General:
1717
TransitionDuration: 7.7
1818
ShowClock: true
1919
ClockFormat: ClockFormat_TEST
20+
ClockDateFormat: ClockDateFormat_TEST
2021
ShowProgressBar: true
2122
ShowPhotoDate: true
2223
ShowImageDesc: true

ImmichFrame.WebApi/Helpers/Config/ServerSettingsV1.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public class ServerSettingsV1 : IConfigSettable
3333
public double TransitionDuration { get; set; } = 1;
3434
public bool ShowClock { get; set; } = true;
3535
public string? ClockFormat { get; set; } = "hh:mm";
36+
public string? ClockDateFormat { get; set; } = "eee, MMM d";
3637
public bool ShowProgressBar { get; set; } = true;
3738
public bool ShowPhotoDate { get; set; } = true;
3839
public string? PhotoDateFormat { get; set; } = "MM/dd/yyyy";
@@ -94,6 +95,7 @@ class GeneralSettingsV1Adapter(ServerSettingsV1 _delegate) : IGeneralSettings
9495
public int RenewImagesDuration => _delegate.RenewImagesDuration;
9596
public bool ShowClock => _delegate.ShowClock;
9697
public string? ClockFormat => _delegate.ClockFormat;
98+
public string? ClockDateFormat => _delegate.ClockDateFormat;
9799
public bool ShowProgressBar => _delegate.ShowProgressBar;
98100
public bool ShowPhotoDate => _delegate.ShowPhotoDate;
99101
public string? PhotoDateFormat => _delegate.PhotoDateFormat;

ImmichFrame.WebApi/Models/ClientSettingsDto.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ public class ClientSettingsDto
1010
public int RenewImagesDuration { get; set; }
1111
public bool ShowClock { get; set; }
1212
public string? ClockFormat { get; set; }
13+
public string? ClockDateFormat { get; set; }
1314
public bool ShowPhotoDate { get; set; }
1415
public bool ShowProgressBar { get; set; }
1516
public string? PhotoDateFormat { get; set; }
@@ -39,6 +40,7 @@ public static ClientSettingsDto FromGeneralSettings(IGeneralSettings generalSett
3940
dto.RenewImagesDuration = generalSettings.RenewImagesDuration;
4041
dto.ShowClock = generalSettings.ShowClock;
4142
dto.ClockFormat = generalSettings.ClockFormat;
43+
dto.ClockDateFormat = generalSettings.ClockDateFormat;
4244
dto.ShowPhotoDate = generalSettings.ShowPhotoDate;
4345
dto.ShowProgressBar = generalSettings.ShowProgressBar;
4446
dto.PhotoDateFormat = generalSettings.PhotoDateFormat;

ImmichFrame.WebApi/Models/ServerSettings.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public class GeneralSettings : IGeneralSettings, IConfigSettable
3535
public double TransitionDuration { get; set; } = 1;
3636
public bool ShowClock { get; set; } = true;
3737
public string? ClockFormat { get; set; } = "hh:mm";
38+
public string? ClockDateFormat { get; set; } = "eee, MMM d";
3839
public bool ShowProgressBar { get; set; } = true;
3940
public bool ShowPhotoDate { get; set; } = true;
4041
public bool ShowImageDesc { get; set; } = true;

Install_Web.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ services:
6161
# RefreshAlbumPeopleInterval: "12"
6262
# ShowClock: "true"
6363
# ClockFormat: "hh:mm"
64+
# ClockDateFormat: "eee, MMM d"
6465
# ShowProgressBar: "true"
6566
# ShowPhotoDate: "true"
6667
# PhotoDateFormat: "yyyy-MM-dd"

docker/Settings.example.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"TransitionDuration": 2,
1919
"ShowClock": true,
2020
"ClockFormat": "hh:mm",
21+
"ClockDateFormat": "eee, MMM d",
2122
"ShowProgressBar": true,
2223
"ShowPhotoDate": true,
2324
"ShowImageDesc": true,

0 commit comments

Comments
 (0)