Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ImmichFrame.Core/Interfaces/IServerSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public interface IGeneralSettings
public string Style { get; }
public string? BaseFontSize { get; }
public bool ShowWeatherDescription { get; }
public bool UseWholeNumberTemperatures { get; }
public string? WeatherIconUrl { get; }
public bool ImageZoom { get; }
public bool ImagePan { get; }
Expand Down
1 change: 1 addition & 0 deletions ImmichFrame.WebApi/Helpers/Config/ServerSettingsV1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ class GeneralSettingsV1Adapter(ServerSettingsV1 _delegate) : IGeneralSettings
public string Style => _delegate.Style;
public string? BaseFontSize => _delegate.BaseFontSize;
public bool ShowWeatherDescription => _delegate.ShowWeatherDescription;
public bool UseWholeNumberTemperatures => false;
public string? WeatherIconUrl => _delegate.WeatherIconUrl;
public bool ImageZoom => _delegate.ImageZoom;
public bool ImagePan => _delegate.ImagePan;
Expand Down
2 changes: 2 additions & 0 deletions ImmichFrame.WebApi/Models/ClientSettingsDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class ClientSettingsDto
public string Style { get; set; }
public string? BaseFontSize { get; set; }
public bool ShowWeatherDescription { get; set; }
public bool UseWholeNumberTemperatures { get; set; }
public string? WeatherIconUrl { get; set; }
public bool ImageZoom { get; set; }
public bool ImagePan { get; set; }
Expand Down Expand Up @@ -54,6 +55,7 @@ public static ClientSettingsDto FromGeneralSettings(IGeneralSettings generalSett
dto.Style = generalSettings.Style;
dto.BaseFontSize = generalSettings.BaseFontSize;
dto.ShowWeatherDescription = generalSettings.ShowWeatherDescription;
dto.UseWholeNumberTemperatures = generalSettings.UseWholeNumberTemperatures;
dto.WeatherIconUrl = generalSettings.WeatherIconUrl;
dto.ImageZoom = generalSettings.ImageZoom;
dto.ImagePan = generalSettings.ImagePan;
Expand Down
1 change: 1 addition & 0 deletions ImmichFrame.WebApi/Models/ServerSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public class GeneralSettings : IGeneralSettings, IConfigSettable
public string Style { get; set; } = "none";
public string? BaseFontSize { get; set; }
public bool ShowWeatherDescription { get; set; } = true;
public bool UseWholeNumberTemperatures { get; set; } = false;
public string? WeatherIconUrl { get; set; } = "https://openweathermap.org/img/wn/{IconId}.png";
public bool ImageZoom { get; set; } = true;
public bool ImagePan { get; set; } = false;
Expand Down
2 changes: 1 addition & 1 deletion immichFrame.Web/src/lib/components/elements/clock.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<img src="{ $configStore.weatherIconUrl.replace('{IconId}', encodeURIComponent(weather.iconId)) }" class="icon-weather" alt="{weather.description}">
{/if}
<div class="weather-location">{weather.location},</div>
<div class="weather-temperature">{weather.temperature?.toFixed(1)}</div>
<div class="weather-temperature">{$configStore.useWholeNumberTemperatures ? Math.round(weather.temperature ?? 0) : weather.temperature?.toFixed(1)}</div>
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
<div class="weather-unit">{weather.unit}</div>
</div>
{#if $configStore.showWeatherDescription}
Expand Down
1 change: 1 addition & 0 deletions immichFrame.Web/src/lib/immichFrameApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ export type ClientSettingsDto = {
style?: string | null;
baseFontSize?: string | null;
showWeatherDescription?: boolean;
useWholeNumberTemperatures?: boolean;
weatherIconUrl?: string | null;
imageZoom?: boolean;
imagePan?: boolean;
Expand Down