45 lines
1.1 KiB
C#
45 lines
1.1 KiB
C#
using global::Microsoft.AspNetCore.Components;
|
|
using MP.Data.DatabaseModels;
|
|
using MP.Data.Services;
|
|
|
|
namespace MP_TAB_SERV.Components
|
|
{
|
|
public partial class SlideMenu
|
|
{
|
|
#region Public Properties
|
|
|
|
[Parameter]
|
|
public List<LinkMenu> MenuItems { get; set; } = new List<LinkMenu>();
|
|
|
|
#endregion Public Properties
|
|
|
|
#region Protected Properties
|
|
|
|
[Inject]
|
|
protected NavigationManager navManager { get; set; } = null!;
|
|
[Inject]
|
|
protected MessageService MsgServ { get; set; } = null!;
|
|
|
|
#endregion Protected Properties
|
|
|
|
#region Protected Methods
|
|
|
|
protected string cssActive(string currUri)
|
|
{
|
|
return navManager.Uri.Contains(currUri) ? "bg-dark text-light" : "";
|
|
}
|
|
|
|
protected async Task SetPage(string tgtUrl)
|
|
{
|
|
await Task.Delay(1);
|
|
if (tgtUrl.Contains("status-map"))
|
|
{
|
|
await MsgServ.IdxMaccSet("");
|
|
}
|
|
await MsgServ.LastOpenedPageSet(tgtUrl);
|
|
navManager.NavigateTo(tgtUrl);
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
}
|
|
} |