[REFACTOR] Name change projects and solution

This commit is contained in:
max
2025-08-10 22:41:36 +02:00
parent 3649d4fad4
commit 9edd0690cf
28 changed files with 70 additions and 31 deletions

View File

@@ -0,0 +1,37 @@
using Microsoft.AspNetCore.Components;
using MudBlazor;
namespace Manager.App.Components.Layout;
public partial class BaseLayout
{
private readonly MudTheme _mudTheme = new MudTheme();
private MudThemeProvider? _themeProvider;
private bool _isDarkTheme = true;
public event EventHandler<bool>? OnDarkThemeChanged;
public bool DarkTheme
{
get => _isDarkTheme;
set
{
_isDarkTheme = value;
ThemeChanged();
}
}
private void ThemeChanged()
{
StateHasChanged();
}
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender && _themeProvider != null)
{
DarkTheme = await _themeProvider.GetSystemDarkModeAsync();
_themeProvider.IsDarkModeChanged = EventCallback.Factory.Create<bool>(this, x => OnDarkThemeChanged?.Invoke(this, x));
}
}
}