Files
mapo-core/MP.INVE/Shared/NavMenu.razor.cs
T
2022-11-22 17:45:16 +01:00

57 lines
1.7 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using System.Net.Http;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.AspNetCore.Components.Forms;
using Microsoft.AspNetCore.Components.Routing;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.Web.Virtualization;
using Microsoft.JSInterop;
using MP.INVE;
using MP.INVE.Shared;
using MP.INVE.Components;
using MP.INVE.Data;
using MP.Data.DTO;
using Blazored.LocalStorage;
namespace MP.INVE.Shared
{
public partial class NavMenu
{
private bool collapseNavMenu = true;
//public List<MP.Data.DatabaseModels.LinkMenu>? ElencoLink { get; set; }
private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null;
private void ToggleNavMenu()
{
collapseNavMenu = !collapseNavMenu;
}
protected override async Task OnInitializedAsync()
{
// recupero elenco JQM
//ElencoLink = await MDService.ElencoLink();
}
protected bool showText { get; set; } = true;
protected void ToggleCompress()
{
showText = !showText;
EC_compressUpdated.InvokeAsync(showText);
}
protected string hideText { get => showText ? "" : "invisible"; }
[Parameter]
public EventCallback<bool> EC_compressUpdated { get; set; }
[Inject]
protected ILocalStorageService localStorage { get; set; } = null!;
[Inject]
protected NavigationManager NavigationManager { get; set; } = null!;
}
}