Replace Visible with ShowLanguageSwitcher property
This commit is contained in:
@ -198,7 +198,10 @@
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (ShowLanguageSwitcher)
|
||||
{
|
||||
<LanguageSwitcher />
|
||||
}
|
||||
|
||||
@if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.Edit, PageState.Page.Permissions) || (PageState.Page.IsPersonalizable && PageState.User != null))
|
||||
{
|
||||
@ -289,6 +292,9 @@
|
||||
[Parameter]
|
||||
public string BodyClass { get; set; } = "card-body";
|
||||
|
||||
[Parameter]
|
||||
public bool ShowLanguageSwitcher { get; set; } = true;
|
||||
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
|
@ -6,7 +6,7 @@
|
||||
@inject ILocalizationService LocalizationService
|
||||
@inject NavigationManager NavigationManager
|
||||
|
||||
@if (_supportedCultures != null && Visible)
|
||||
@if (_supportedCultures != null)
|
||||
{
|
||||
<div class="btn-group" role="group">
|
||||
<button id="btnCultures" type="button" class="btn btn-outline-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
@ -24,9 +24,6 @@
|
||||
@code{
|
||||
private IEnumerable<Culture> _supportedCultures;
|
||||
|
||||
[Parameter]
|
||||
public bool Visible { get; set; } = true;
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
_supportedCultures = await LocalizationService.GetCulturesAsync();
|
||||
|
Reference in New Issue
Block a user