remove broken MudBlazor.ThemeManager 3.0.0 dependency — incompatible with MudBlazor 8.15.0, ThemeManagerTheme wrapper produced NRE in GenerateTheme; wire MudThemeProvider to DeepDrftPalettes.Default and hardcode AppBar Elevation=4
This commit is contained in:
@@ -7,14 +7,14 @@
|
||||
@inherits LayoutComponentBase
|
||||
@implements IDisposable
|
||||
|
||||
<MudThemeProvider Theme="@_themeManager.Theme" IsDarkMode="_isDarkMode" />
|
||||
<MudThemeProvider Theme="@DeepDrftPalettes.Default" IsDarkMode="_isDarkMode" />
|
||||
<MudPopoverProvider />
|
||||
<MudDialogProvider />
|
||||
<MudSnackbarProvider />
|
||||
<div class="@ThemeWrapperClass">
|
||||
<MudLayout Style="display: flex; flex-direction: column; min-height: 100vh">
|
||||
<AudioPlayerProvider>
|
||||
<DeepDrftMenu Elevation="_themeManager.AppBarElevation" @bind-IsDarkMode="_isDarkMode" />
|
||||
<DeepDrftMenu Elevation="4" @bind-IsDarkMode="_isDarkMode" />
|
||||
<MudMainContent Class="flex-grow-1 pt-16 pb-8">
|
||||
<MudContainer MaxWidth="MaxWidth.False" Class="pa-4">
|
||||
@Body
|
||||
@@ -68,28 +68,6 @@
|
||||
|
||||
// Register to persist state when prerendering completes
|
||||
_persistingSubscription = PersistentState.RegisterOnPersisting(PersistDarkMode);
|
||||
|
||||
// Palettes + typography live in DeepDrftShared.Client.Common.DeepDrftPalettes
|
||||
// so the CMS host can reuse them. We wrap into ThemeManagerTheme to keep
|
||||
// the MudBlazor.ThemeManager integration intact.
|
||||
_themeManager = new ThemeManagerTheme
|
||||
{
|
||||
Theme = DeepDrftPalettes.Default,
|
||||
};
|
||||
}
|
||||
|
||||
private ThemeManagerTheme _themeManager;
|
||||
public bool _themeManagerOpen = false;
|
||||
|
||||
void OpenThemeManager(bool value)
|
||||
{
|
||||
_themeManagerOpen = value;
|
||||
}
|
||||
|
||||
void UpdateTheme(ThemeManagerTheme value)
|
||||
{
|
||||
_themeManager = value;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
// Theme wrapper class for CSS targeting
|
||||
|
||||
Reference in New Issue
Block a user