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:
@@ -14,7 +14,6 @@
|
|||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.7" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.7" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Http" Version="10.0.7" />
|
<PackageReference Include="Microsoft.Extensions.Http" Version="10.0.7" />
|
||||||
<PackageReference Include="MudBlazor" Version="8.15.0" />
|
<PackageReference Include="MudBlazor" Version="8.15.0" />
|
||||||
<PackageReference Include="MudBlazor.ThemeManager" Version="3.0.0" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -7,14 +7,14 @@
|
|||||||
@inherits LayoutComponentBase
|
@inherits LayoutComponentBase
|
||||||
@implements IDisposable
|
@implements IDisposable
|
||||||
|
|
||||||
<MudThemeProvider Theme="@_themeManager.Theme" IsDarkMode="_isDarkMode" />
|
<MudThemeProvider Theme="@DeepDrftPalettes.Default" IsDarkMode="_isDarkMode" />
|
||||||
<MudPopoverProvider />
|
<MudPopoverProvider />
|
||||||
<MudDialogProvider />
|
<MudDialogProvider />
|
||||||
<MudSnackbarProvider />
|
<MudSnackbarProvider />
|
||||||
<div class="@ThemeWrapperClass">
|
<div class="@ThemeWrapperClass">
|
||||||
<MudLayout Style="display: flex; flex-direction: column; min-height: 100vh">
|
<MudLayout Style="display: flex; flex-direction: column; min-height: 100vh">
|
||||||
<AudioPlayerProvider>
|
<AudioPlayerProvider>
|
||||||
<DeepDrftMenu Elevation="_themeManager.AppBarElevation" @bind-IsDarkMode="_isDarkMode" />
|
<DeepDrftMenu Elevation="4" @bind-IsDarkMode="_isDarkMode" />
|
||||||
<MudMainContent Class="flex-grow-1 pt-16 pb-8">
|
<MudMainContent Class="flex-grow-1 pt-16 pb-8">
|
||||||
<MudContainer MaxWidth="MaxWidth.False" Class="pa-4">
|
<MudContainer MaxWidth="MaxWidth.False" Class="pa-4">
|
||||||
@Body
|
@Body
|
||||||
@@ -68,28 +68,6 @@
|
|||||||
|
|
||||||
// Register to persist state when prerendering completes
|
// Register to persist state when prerendering completes
|
||||||
_persistingSubscription = PersistentState.RegisterOnPersisting(PersistDarkMode);
|
_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
|
// Theme wrapper class for CSS targeting
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
@using Microsoft.JSInterop
|
@using Microsoft.JSInterop
|
||||||
@using MudBlazor
|
@using MudBlazor
|
||||||
@using MudBlazor.Services
|
@using MudBlazor.Services
|
||||||
@using MudBlazor.ThemeManager
|
|
||||||
@using DeepDrftPublic.Client.Common
|
@using DeepDrftPublic.Client.Common
|
||||||
@using DeepDrftShared.Client.Common
|
@using DeepDrftShared.Client.Common
|
||||||
@using DeepDrftShared.Client.Components
|
@using DeepDrftShared.Client.Components
|
||||||
@@ -9,7 +9,6 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<base href="/" />
|
<base href="/" />
|
||||||
<DeepDrftFontLinks />
|
<DeepDrftFontLinks />
|
||||||
<link href="@Assets["_content/MudBlazor.ThemeManager/MudBlazorThemeManager.css"]" rel="stylesheet" />
|
|
||||||
<link href=@Assets["_content/MudBlazor/MudBlazor.min.css"] rel="stylesheet" />
|
<link href=@Assets["_content/MudBlazor/MudBlazor.min.css"] rel="stylesheet" />
|
||||||
<link rel="stylesheet" href="@Assets["DeepDrftPublic.styles.css"]"/>
|
<link rel="stylesheet" href="@Assets["DeepDrftPublic.styles.css"]"/>
|
||||||
<link rel="stylesheet" href="@Assets["_content/DeepDrftShared.Client/styles/deepdrft-tokens.css"]" />
|
<link rel="stylesheet" href="@Assets["_content/DeepDrftShared.Client/styles/deepdrft-tokens.css"]" />
|
||||||
|
|||||||
Reference in New Issue
Block a user