Files
SystemX.Web/Projects/WebClient/Web.Tra/Components/Layout/MainLayout.razor

43 lines
1.4 KiB
Plaintext

@using SystemX.Core.Services
@using WebClient.Library.Config
@inherits LayoutComponentBase
@inject ConfigService<WebClientConfig> configService
@inject NavigationManager NavigationManager
<RadzenLayout>
<RadzenHeader Style="height: 5rem; font-size: 2rem;" class="rz-px-5">
<RadzenStack Orientation="Orientation.Horizontal" AlignItems="AlignItems.Center" JustifyContent="JustifyContent.SpaceBetween" Gap="0">
<RadzenStack Style="height: 5rem;" Orientation="Orientation.Horizontal" AlignItems="AlignItems.Center" JustifyContent="JustifyContent.Center">
<RadzenLabel Text="@($"{ApplicationName}")" />
</RadzenStack>
<div class="rz-mr-2">
<RadzenAppearanceToggle />
</div>
</RadzenStack>
</RadzenHeader>
<RadzenBody Style="margin:0; padding:0; overflow:hidden; font-size: 2rem;">
@Body
</RadzenBody>
</RadzenLayout>
<RadzenComponents @rendermode="InteractiveServer" />
@code {
bool sidebarExpanded = true;
string ApplicationName = string.Empty;
string Page = string.Empty;
protected override async Task OnInitializedAsync()
{
ApplicationName = configService?.GetConfig()?.ApplicationName;
Page = NavigationManager.ToBaseRelativePath(NavigationManager.Uri);
}
private void OnClickMenu(MenuItemEventArgs args)
{
Page = args.Text;
}
}