Files
YouTube-Manager/Manager.App/Components/Layout/ApplicationLayout.razor
2025-09-10 01:46:07 +02:00

22 lines
1.1 KiB
Plaintext

@inherits LayoutComponentBase
@layout BaseLayout
<CascadingValue Value="this">
<MudAppBar Color="Color.Primary">
<MudIconButton Icon="@Icons.Material.Filled.Menu" Color="Color.Inherit" Edge="Edge.Start" OnClick="@(_ => ToggleDrawerOpen())" />
<MudText Typo="Typo.h6">@AppText</MudText>
<MudSpacer/>
<MudTooltip Text="Gitea source">
<MudIconButton Icon="@Icons.Material.Filled.Code" Color="Color.Info" Href="https://git.netzbyte.com/max/Yt-Import" Target="_blank"/>
</MudTooltip>
@if (BaseLayout != null)
{
<MudTooltip Text="@(BaseLayout.DarkTheme ? "Toggle to light mode" : "Toggle to dark mode")">
<MudToggleIconButton @bind-Toggled="@BaseLayout.DarkTheme" Color="Color.Dark" ToggledColor="Color.Warning" Icon="@Icons.Material.Filled.DarkMode" ToggledIcon="@Icons.Material.Filled.LightMode"/>
</MudTooltip>
}
</MudAppBar>
<div style="display: flex; flex-direction: column; flex: 1; padding: 20px; min-height: 0;">
@Body
</div>
</CascadingValue>