Fixed dark mode code blocks (#242)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2025-01-02 15:24:15 +01:00
1 parent 38a45955fb
commit 3b93841982
3 files changed
+9 -1

No files matched your search

@@ -1,3 +1,5 @@
using AIStudio.Settings;
using Microsoft.AspNetCore.Components;
using RustService = AIStudio.Tools.RustService;
@@ -44,6 +46,9 @@ public partial class ContentBlockComponent : ComponentBase
[Inject]
private ISnackbar Snackbar { get; init; } = null!;
[Inject]
private SettingsManager SettingsManager { get; init; } = null!;
private bool HideContent { get; set; }
@@ -115,4 +120,6 @@ public partial class ContentBlockComponent : ComponentBase
}
private string CardClasses => $"my-2 rounded-lg {this.Class}";
private CodeBlockTheme CodeColorPalette => this.SettingsManager.IsDarkMode ? CodeBlockTheme.Dark : CodeBlockTheme.Default;
}