70 lines
1.6 KiB
Plaintext
70 lines
1.6 KiB
Plaintext
@inherits LayoutComponentBase
|
|
|
|
@using GWMS.UI.Data
|
|
@using GWMS.UI.Components
|
|
|
|
@inject MessageService MessageService
|
|
@implements IDisposable
|
|
|
|
<div class="page">
|
|
<div class="@sideClass">
|
|
<NavMenu EC_compressUpdated="@UpdateNavDisplay" />
|
|
</div>
|
|
|
|
<CascadingValue Name="ShowSearch" Value=@ShowSearch>
|
|
<div class="main mr-1">
|
|
<div class="top-row">
|
|
<CmpTop></CmpTop>
|
|
</div>
|
|
<div class="content pt-1 pt-lg-2 mb-5 px-0 px-lg-2">
|
|
@Body
|
|
</div>
|
|
<div class="fixed-bottom bottom-row">
|
|
<CmpFooter></CmpFooter>
|
|
</div>
|
|
</div>
|
|
</CascadingValue>
|
|
</div>
|
|
|
|
@code {
|
|
bool ShowSearch { get; set; } = false;
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
MessageService.EA_ShowSearch += OnShowSearch;
|
|
MessageService.EA_HideSearch += OnHideSearch;
|
|
}
|
|
public void OnShowSearch()
|
|
{
|
|
ShowSearch = true;
|
|
InvokeAsync(() =>
|
|
{
|
|
StateHasChanged();
|
|
});
|
|
}
|
|
public void OnHideSearch()
|
|
{
|
|
ShowSearch = false;
|
|
InvokeAsync(() =>
|
|
{
|
|
StateHasChanged();
|
|
});
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
MessageService.EA_ShowSearch -= OnShowSearch;
|
|
MessageService.EA_ShowSearch -= OnHideSearch;
|
|
}
|
|
|
|
protected bool navLarge { get; set; } = true;
|
|
|
|
protected string sideClass { get; set; } = "sidebar";
|
|
|
|
protected void UpdateNavDisplay()
|
|
{
|
|
navLarge = !navLarge;
|
|
sideClass = navLarge ? "sidebar" : "sidebarSmall";
|
|
}
|
|
|
|
} |