diff --git a/Helper/ConfigHelper.cs b/Helper/ConfigHelper.cs index 482fe074..e3c13f49 100644 --- a/Helper/ConfigHelper.cs +++ b/Helper/ConfigHelper.cs @@ -179,6 +179,7 @@ public UserConfig GetUserConfig(ClaimsPrincipal user) { EnableCsvImports = bool.Parse(_config[nameof(UserConfig.EnableCsvImports)]), UseDarkMode = bool.Parse(_config[nameof(UserConfig.UseDarkMode)]), + UseSystemColorMode = bool.Parse(_config[nameof(UserConfig.UseSystemColorMode)]), UseMPG = bool.Parse(_config[nameof(UserConfig.UseMPG)]), UseDescending = bool.Parse(_config[nameof(UserConfig.UseDescending)]), EnableAuth = bool.Parse(_config[nameof(UserConfig.EnableAuth)]), diff --git a/Models/UserConfig.cs b/Models/UserConfig.cs index 4be4b943..6dbace43 100644 --- a/Models/UserConfig.cs +++ b/Models/UserConfig.cs @@ -3,6 +3,7 @@ public class UserConfig { public bool UseDarkMode { get; set; } + public bool UseSystemColorMode { get; set; } public bool EnableCsvImports { get; set; } public bool UseMPG { get; set; } public bool UseDescending { get; set; } diff --git a/Views/Home/_Settings.cshtml b/Views/Home/_Settings.cshtml index dc59df8c..e3eff277 100644 --- a/Views/Home/_Settings.cshtml +++ b/Views/Home/_Settings.cshtml @@ -13,10 +13,14 @@
-
- +
+
+
+ + +
diff --git a/Views/Shared/_Layout.cshtml b/Views/Shared/_Layout.cshtml index 8c0820c5..8a916a13 100644 --- a/Views/Shared/_Layout.cshtml +++ b/Views/Shared/_Layout.cshtml @@ -5,6 +5,7 @@ @{ var userConfig = config.GetUserConfig(User); var useDarkMode = userConfig.UseDarkMode; + var useSystemColorMode = userConfig.UseSystemColorMode; var enableCsvImports = userConfig.EnableCsvImports; var useMPG = userConfig.UseMPG; var useMarkDown = userConfig.UseMarkDownOnSavedNotes; @@ -128,7 +129,7 @@
-@if (!useDarkMode) +@if (useSystemColorMode) {