diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Brand/Default.cshtml b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Brand/Default.cshtml new file mode 100644 index 0000000000..d19af37d64 --- /dev/null +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Brand/Default.cshtml @@ -0,0 +1 @@ +ProjectName \ No newline at end of file diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Brand/MainNavbarBrandViewComponent.cs b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Brand/MainNavbarBrandViewComponent.cs new file mode 100644 index 0000000000..8459dc9ae7 --- /dev/null +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Brand/MainNavbarBrandViewComponent.cs @@ -0,0 +1,12 @@ +using Microsoft.AspNetCore.Mvc; + +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar.Brand +{ + public class MainNavbarBrandViewComponent : AbpViewComponent + { + public IViewComponentResult Invoke() + { + return View("~/Views/Shared/Components/Theme/MainNavbar/Brand/Default.cshtml"); + } + } +} diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Default.cshtml b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Default.cshtml index 3f59023e01..33a8a423f0 100644 --- a/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Default.cshtml +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Default.cshtml @@ -1,31 +1,21 @@ -@using Localization.Resources.AbpUi -@using Microsoft.AspNetCore.Mvc.Localization -@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbarMenu -@using Volo.Abp.MultiTenancy -@using Volo.Abp.Users -@inject ICurrentUser CurrentUser -@inject ICurrentTenant CurrentTenant -@inject IHtmlLocalizer L +@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar.Brand +@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar.Menu +@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar.Tools diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbarMenu/AbpMenuViewComponent.cs b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Menu/AbpMenuViewComponent.cs similarity index 90% rename from src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbarMenu/AbpMenuViewComponent.cs rename to src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Menu/AbpMenuViewComponent.cs index 5e96e6e4d9..5059075f1a 100644 --- a/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbarMenu/AbpMenuViewComponent.cs +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Menu/AbpMenuViewComponent.cs @@ -2,7 +2,7 @@ using Microsoft.AspNetCore.Mvc; using Volo.Abp.UI.Navigation; -namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbarMenu +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar.Menu { public class MainNavbarMenuViewComponent : AbpViewComponent { @@ -16,7 +16,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.M public async Task InvokeAsync() { var menu = await _menuManager.GetAsync(StandardMenus.Main); - return View("~/Views/Shared/Components/Theme/MainNavbarMenu/Default.cshtml", menu); + return View("~/Views/Shared/Components/Theme/MainNavbar/Menu/Default.cshtml", menu); } } } diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbarMenu/Default.cshtml b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Menu/Default.cshtml similarity index 100% rename from src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbarMenu/Default.cshtml rename to src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Menu/Default.cshtml diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Tools/Default.cshtml b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Tools/Default.cshtml new file mode 100644 index 0000000000..1e4b10ec7c --- /dev/null +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Tools/Default.cshtml @@ -0,0 +1,15 @@ +@using Localization.Resources.AbpUi +@using Microsoft.AspNetCore.Mvc.Localization +@using Volo.Abp.MultiTenancy +@using Volo.Abp.Users +@inject ICurrentUser CurrentUser +@inject ICurrentTenant CurrentTenant +@inject IHtmlLocalizer L +@if (CurrentUser.IsAuthenticated) +{ + @CurrentUser.UserName (@L["Logout"]) +} +else +{ + Login +} \ No newline at end of file diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Tools/MainNavbarToolsViewComponent.cs b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Tools/MainNavbarToolsViewComponent.cs new file mode 100644 index 0000000000..fe582848c1 --- /dev/null +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Views/Shared/Components/Theme/MainNavbar/Tools/MainNavbarToolsViewComponent.cs @@ -0,0 +1,12 @@ +using Microsoft.AspNetCore.Mvc; + +namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Views.Shared.Components.Theme.MainNavbar.Tools +{ + public class MainNavbarToolsViewComponent : AbpViewComponent + { + public IViewComponentResult Invoke() + { + return View("~/Views/Shared/Components/Theme/MainNavbar/Tools/Default.cshtml"); + } + } +} diff --git a/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj index 6994f88381..9321d3887f 100644 --- a/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj +++ b/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj @@ -20,6 +20,10 @@ + + + +