Browse Source
fix: update MudMenu components in LanguageSwitch and LoginDisplay for improved UI consistency and interaction
pull/25235/head
maliming
5 months ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
6 changed files with
29 additions and
10 deletions
-
modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.MudBlazorBasicTheme/Themes/Basic/LanguageSwitch.razor
-
modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Server.MudBlazorBasicTheme/Themes/Basic/LoginDisplay.razor
-
modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.MudBlazorBasicTheme/Themes/Basic/MainLayout.razor
-
modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.MudBlazorBasicTheme/Themes/Basic/NavMenu.razor
-
modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme/Themes/Basic/LanguageSwitch.razor
-
modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.MudBlazorBasicTheme/Themes/Basic/LoginDisplay.razor
|
|
|
@ -8,13 +8,18 @@ |
|
|
|
|
|
|
|
@if (_otherLanguages != null && _otherLanguages.Any()) |
|
|
|
{ |
|
|
|
<MudMenu Icon="@Icons.Material.Filled.Language"> |
|
|
|
<MudMenu> |
|
|
|
<ActivatorContent> |
|
|
|
<MudIconButton Icon="@Icons.Material.Outlined.Translate" Color="Color.Inherit" /> |
|
|
|
</ActivatorContent> |
|
|
|
<ChildContent> |
|
|
|
<MudMenuItem Disabled="true">@_currentLanguage.DisplayName</MudMenuItem> |
|
|
|
<MudDivider /> |
|
|
|
@foreach (var language in _otherLanguages) |
|
|
|
{ |
|
|
|
<MudMenuItem OnClick="@(() => ChangeLanguage(language))">@language.DisplayName</MudMenuItem> |
|
|
|
} |
|
|
|
</ChildContent> |
|
|
|
</MudMenu> |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -13,7 +13,11 @@ |
|
|
|
|
|
|
|
<AuthorizeView> |
|
|
|
<Authorized> |
|
|
|
<MudMenu Icon="@Icons.Material.Filled.AccountCircle"> |
|
|
|
<MudMenu> |
|
|
|
<ActivatorContent> |
|
|
|
<MudIconButton Icon="@Icons.Material.Outlined.AccountCircle" Color="Color.Inherit" /> |
|
|
|
</ActivatorContent> |
|
|
|
<ChildContent> |
|
|
|
<MudMenuItem> |
|
|
|
@if (CurrentTenant.Name != null) |
|
|
|
{ |
|
|
|
@ -31,6 +35,7 @@ |
|
|
|
<MudMenuItem Href="@menuItem.Url?.TrimStart('/', '~')" Target="@menuItem.Target">@menuItem.DisplayName</MudMenuItem> |
|
|
|
} |
|
|
|
} |
|
|
|
</ChildContent> |
|
|
|
</MudMenu> |
|
|
|
</Authorized> |
|
|
|
<NotAuthorized> |
|
|
|
|
|
|
|
@ -2,7 +2,9 @@ |
|
|
|
@using Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.Components.LayoutHooks |
|
|
|
@using Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.Components |
|
|
|
@using Volo.Abp.AspNetCore.Components.Web.Theming.MudBlazor.Layout |
|
|
|
@using Volo.Abp.Ui.Branding |
|
|
|
@inherits LayoutComponentBase |
|
|
|
@inject IBrandingProvider BrandingProvider |
|
|
|
|
|
|
|
<MudThemeProvider /> |
|
|
|
<MudPopoverProvider /> |
|
|
|
@ -15,13 +17,15 @@ |
|
|
|
Color="Color.Inherit" |
|
|
|
Edge="Edge.Start" |
|
|
|
OnClick="@ToggleDrawer" /> |
|
|
|
<MudText Typo="Typo.h6">@BrandingProvider.AppName</MudText> |
|
|
|
<MudSpacer /> |
|
|
|
<NavToolbar /> |
|
|
|
</MudAppBar> |
|
|
|
|
|
|
|
<MudDrawer @bind-Open="@_drawerOpen" |
|
|
|
ClipMode="DrawerClipMode.Always" |
|
|
|
Elevation="1" |
|
|
|
Width="280px"> |
|
|
|
Width="300px"> |
|
|
|
<NavMenu /> |
|
|
|
</MudDrawer> |
|
|
|
|
|
|
|
|
|
|
|
@ -1,9 +1,4 @@ |
|
|
|
@using Volo.Abp.Ui.Branding |
|
|
|
@inject IBrandingProvider BrandingProvider |
|
|
|
|
|
|
|
<MudNavMenu> |
|
|
|
<MudText Typo="Typo.h6" Class="px-4 pt-2">@BrandingProvider.AppName</MudText> |
|
|
|
<MudDivider Class="my-1"/> |
|
|
|
@if(Menu != null && !Menu.Items.IsNullOrEmpty()) |
|
|
|
{ |
|
|
|
foreach (var menuItem in Menu.Items) |
|
|
|
|
|
|
|
@ -10,13 +10,18 @@ |
|
|
|
|
|
|
|
@if (_otherLanguages != null && _otherLanguages.Any()) |
|
|
|
{ |
|
|
|
<MudMenu Icon="@Icons.Material.Filled.Language"> |
|
|
|
<MudMenu> |
|
|
|
<ActivatorContent> |
|
|
|
<MudIconButton Icon="@Icons.Material.Outlined.Translate" Color="Color.Inherit" /> |
|
|
|
</ActivatorContent> |
|
|
|
<ChildContent> |
|
|
|
<MudMenuItem Disabled="true">@_currentLanguage.DisplayName</MudMenuItem> |
|
|
|
<MudDivider /> |
|
|
|
@foreach (var language in _otherLanguages) |
|
|
|
{ |
|
|
|
<MudMenuItem OnClick="@(() => ChangeLanguageAsync(language))">@language.DisplayName</MudMenuItem> |
|
|
|
} |
|
|
|
</ChildContent> |
|
|
|
</MudMenu> |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -16,7 +16,11 @@ |
|
|
|
|
|
|
|
<AuthorizeView> |
|
|
|
<Authorized> |
|
|
|
<MudMenu Icon="@Icons.Material.Filled.AccountCircle"> |
|
|
|
<MudMenu> |
|
|
|
<ActivatorContent> |
|
|
|
<MudIconButton Icon="@Icons.Material.Outlined.AccountCircle" Color="Color.Inherit" /> |
|
|
|
</ActivatorContent> |
|
|
|
<ChildContent> |
|
|
|
<MudMenuItem> |
|
|
|
@if (CurrentTenant.Name != null) |
|
|
|
{ |
|
|
|
@ -36,6 +40,7 @@ |
|
|
|
} |
|
|
|
<MudDivider /> |
|
|
|
<MudMenuItem OnClick="BeginSignOut">@UiLocalizer["Logout"]</MudMenuItem> |
|
|
|
</ChildContent> |
|
|
|
</MudMenu> |
|
|
|
</Authorized> |
|
|
|
<NotAuthorized> |
|
|
|
|