mirror of https://github.com/abpframework/abp.git
2 changed files with 26 additions and 6 deletions
@ -1,12 +1,22 @@ |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp.UI.Navigation; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar.Toolbar.Items.UserMenu |
|||
{ |
|||
public class UserMenuViewComponent : AbpViewComponent |
|||
{ |
|||
public IViewComponentResult Invoke() |
|||
private readonly IMenuManager _menuManager; |
|||
|
|||
public UserMenuViewComponent(IMenuManager menuManager) |
|||
{ |
|||
_menuManager = menuManager; |
|||
} |
|||
|
|||
public async Task<IViewComponentResult> InvokeAsync() |
|||
{ |
|||
return View("~/Views/Shared/Components/Theme/MainNavbar/Toolbar/Items/UserMenu/Default.cshtml"); |
|||
var menu = await _menuManager.GetAsync(StandardMenus.User); |
|||
return View("~/Views/Shared/Components/Theme/MainNavbar/Toolbar/Items/UserMenu/Default.cshtml", menu); |
|||
} |
|||
} |
|||
} |
|||
|
|||
Loading…
Reference in new issue