59 lines
1.3 KiB
Plaintext
59 lines
1.3 KiB
Plaintext
@inherits LayoutComponentBase
|
|
|
|
@using BlaServApp.UI.Data
|
|
@using BlaServApp.UI.Components
|
|
@inject MessageService MessageService
|
|
@implements IDisposable
|
|
|
|
<div class="page">
|
|
<div class="sidebar">
|
|
<NavMenu />
|
|
</div>
|
|
|
|
<CascadingValue Name="ShowSearch" Value=@ShowSearch>
|
|
<div class="main">
|
|
<div class="top-row">
|
|
<CmpTop></CmpTop>
|
|
</div>
|
|
<div class="content px-4 mb-5">
|
|
@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;
|
|
}
|
|
|
|
} |