2022-04-23 20:29:55 +02:00
|
|
|
@inherits LayoutComponentBase
|
|
|
|
|
2022-06-22 16:23:11 +02:00
|
|
|
<MudThemeProvider @ref="@MudThemeProvider" @bind-IsDarkMode="@IsDarkMode"/>
|
2022-04-23 20:29:55 +02:00
|
|
|
<MudDialogProvider/>
|
|
|
|
<MudSnackbarProvider/>
|
|
|
|
|
|
|
|
<MudLayout>
|
|
|
|
<MudAppBar Elevation="0">
|
2022-06-22 16:23:11 +02:00
|
|
|
<MudIconButton Icon="@Icons.Material.Filled.Menu" Color="Color.Inherit" Edge="Edge.Start"
|
|
|
|
OnClick="@((e) => DrawerToggle())"/>
|
2022-04-23 20:29:55 +02:00
|
|
|
<MudSpacer/>
|
2022-06-22 16:23:11 +02:00
|
|
|
<MudTooltip Duration="1000" Text="Powered by MudBlazor">
|
|
|
|
<MudIconButton Icon="@Icons.Custom.Brands.MudBlazor" Color="Color.Inherit"
|
|
|
|
Link="https://mudblazor.com/" Target="_blank"/>
|
|
|
|
</MudTooltip>
|
|
|
|
<MudTooltip Duration="1000" Text="Github Repository">
|
|
|
|
<MudIconButton Icon="@Icons.Custom.Brands.GitHub" Color="Color.Inherit"
|
|
|
|
Link="https://github.com/asesidaa/GC-local-server-rewrite/" Target="_blank"/>
|
|
|
|
</MudTooltip>
|
|
|
|
<MudTooltip Duration="1000" Text="@(IsDarkMode ? "Switch to Light Mode" : "Switch to DarkMode")">
|
|
|
|
<MudToggleIconButton @bind-Toggled="@IsDarkMode"
|
|
|
|
Icon="@Icons.Material.Outlined.DarkMode" Color="Color.Inherit"
|
|
|
|
ToggledIcon="@Icons.Material.Filled.LightMode"/>
|
|
|
|
</MudTooltip>
|
2022-04-23 20:29:55 +02:00
|
|
|
</MudAppBar>
|
2022-06-22 16:23:11 +02:00
|
|
|
<MudDrawer @bind-Open="drawerOpen" Elevation="1">
|
2022-04-23 20:29:55 +02:00
|
|
|
<MudDrawerHeader>
|
2022-06-21 09:45:18 +02:00
|
|
|
<MudText Typo="Typo.h6">GC local server Admin</MudText>
|
2022-04-23 20:29:55 +02:00
|
|
|
</MudDrawerHeader>
|
|
|
|
<NavMenu/>
|
|
|
|
</MudDrawer>
|
|
|
|
<MudMainContent>
|
|
|
|
<MudContainer MaxWidth="MaxWidth.Large" Class="my-16 pt-16">
|
|
|
|
@Body
|
|
|
|
</MudContainer>
|
|
|
|
</MudMainContent>
|
|
|
|
</MudLayout>
|
|
|
|
|
|
|
|
@code {
|
2022-06-22 16:23:11 +02:00
|
|
|
bool drawerOpen = true;
|
|
|
|
|
|
|
|
public bool IsDarkMode { get; set; }
|
|
|
|
|
|
|
|
public MudThemeProvider MudThemeProvider { get; set; } = null!;
|
|
|
|
|
|
|
|
protected override async Task OnAfterRenderAsync(bool firstRender)
|
|
|
|
{
|
|
|
|
if (firstRender)
|
|
|
|
{
|
|
|
|
IsDarkMode = await MudThemeProvider.GetSystemPreference();
|
|
|
|
StateHasChanged();
|
|
|
|
}
|
|
|
|
}
|
2022-04-23 20:29:55 +02:00
|
|
|
|
|
|
|
void DrawerToggle()
|
|
|
|
{
|
2022-06-22 16:23:11 +02:00
|
|
|
drawerOpen = !drawerOpen;
|
2022-04-23 20:29:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|