From ed31113bd187ed9f3833de1e45d38a83dfc098ee Mon Sep 17 00:00:00 2001 From: Carl Sixsmith Date: Wed, 14 Aug 2024 12:55:39 +0100 Subject: [PATCH] This hotfix addresses an issue where the primary colour doesn't get changed by environment when set in the layout service --- src/Server.UI/Services/Layout/LayoutService.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Server.UI/Services/Layout/LayoutService.cs b/src/Server.UI/Services/Layout/LayoutService.cs index bff82fcf..52e56fe7 100644 --- a/src/Server.UI/Services/Layout/LayoutService.cs +++ b/src/Server.UI/Services/Layout/LayoutService.cs @@ -10,14 +10,15 @@ public class LayoutService public UserPreferences.UserPreferences UserPreferences { get; private set; } = new(); public DarkLightMode DarkModeToggle = DarkLightMode.System; - public LayoutService(IUserPreferencesService userPreferencesService) + public LayoutService(IUserPreferencesService userPreferencesService, IConfiguration configuration) { this.userPreferencesService = userPreferencesService; + this.PrimaryColor = configuration["PrimaryColour"] ?? "#722660"; } public bool IsRTL { get; private set; } public bool IsDarkMode { get; private set; } - public string PrimaryColor { get; set; } = "#722660"; + public string PrimaryColor { get; set; } public string DarkPrimaryColor { get; set; } = "#AA3C85"; public string SecondaryColor { get; set; } = "#ff4081"; public double BorderRadius { get; set; } = 4;