|
|
|
@ -1,4 +1,8 @@
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Microsoft.AspNetCore.Builder;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using Microsoft.Extensions.Options;
|
|
|
|
|
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar.LanguageSwitch;
|
|
|
|
|
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.Toolbar.UserMenu;
|
|
|
|
|
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Toolbars;
|
|
|
|
@ -19,7 +23,13 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Toolbars
|
|
|
|
|
return Task.CompletedTask;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var requestLocalizationOptions = context.ServiceProvider.GetService<IOptions<RequestLocalizationOptions>>();
|
|
|
|
|
|
|
|
|
|
if (requestLocalizationOptions.Value.SupportedCultures.Count > 1)
|
|
|
|
|
{
|
|
|
|
|
context.Toolbar.Items.Add(new ToolbarItem(typeof(LanguageSwitchViewComponent)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
context.Toolbar.Items.Add(new ToolbarItem(typeof(UserMenuViewComponent)));
|
|
|
|
|
|
|
|
|
|
return Task.CompletedTask;
|
|
|
|
|