Browse Source
feat: standardize dialog options across various components for consistency
pull/25235/head
maliming
4 weeks ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
7 changed files with
28 additions and
11 deletions
-
framework/src/Volo.Abp.MudBlazorUI/AbpMudCrudPageBase.cs
-
framework/src/Volo.Abp.MudBlazorUI/Components/ObjectExtending/MudCheckExtensionProperty.razor
-
modules/identity/src/Volo.Abp.Identity.Blazor.MudBlazor/Pages/Identity/RoleManagement.razor
-
modules/identity/src/Volo.Abp.Identity.Blazor.MudBlazor/Pages/Identity/UserManagement.razor
-
modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor.MudBlazor/Components/PermissionManagementModal.razor
-
modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor.MudBlazor/Components/ResourcePermissionManagementModal.razor
-
modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor.MudBlazor/Pages/TenantManagement/TenantManagement.razor
|
|
|
@ -203,6 +203,22 @@ public abstract class AbpMudCrudPageBase< |
|
|
|
protected MudDialog? _createDialog; |
|
|
|
protected MudDialog? _editDialog; |
|
|
|
|
|
|
|
protected virtual DialogOptions CreateDialogOptions => new DialogOptions |
|
|
|
{ |
|
|
|
MaxWidth = MaxWidth.Medium, |
|
|
|
FullWidth = true, |
|
|
|
CloseOnEscapeKey = true, |
|
|
|
BackdropClick = false |
|
|
|
}; |
|
|
|
|
|
|
|
protected virtual DialogOptions EditDialogOptions => new DialogOptions |
|
|
|
{ |
|
|
|
MaxWidth = MaxWidth.Medium, |
|
|
|
FullWidth = true, |
|
|
|
CloseOnEscapeKey = true, |
|
|
|
BackdropClick = false |
|
|
|
}; |
|
|
|
|
|
|
|
protected AbpMudExtensibleDataGrid<TListViewModel> _dataGrid = default!; |
|
|
|
|
|
|
|
protected AbpMudCrudPageBase() |
|
|
|
|
|
|
|
@ -9,5 +9,6 @@ |
|
|
|
Label="@PropertyInfo.GetLocalizedDisplayName(StringLocalizerFactory)" |
|
|
|
@bind-Value="@Value" |
|
|
|
Disabled="IsReadonlyField" |
|
|
|
Color="Color.Primary" /> |
|
|
|
Color="Color.Primary" |
|
|
|
UncheckedColor="Color.Default" /> |
|
|
|
} |
|
|
|
|
|
|
|
@ -32,7 +32,7 @@ |
|
|
|
@* ************************* CREATE DIALOG ************************* *@ |
|
|
|
@if (HasCreatePermission) |
|
|
|
{ |
|
|
|
<MudDialog @ref="_createDialog" Options="@(new DialogOptions { MaxWidth = MaxWidth.Medium, FullWidth = true, CloseOnEscapeKey = true })"> |
|
|
|
<MudDialog @ref="_createDialog" Options="@CreateDialogOptions"> |
|
|
|
<TitleContent> |
|
|
|
<MudText Typo="Typo.h6">@L["NewRole"]</MudText> |
|
|
|
</TitleContent> |
|
|
|
@ -57,7 +57,7 @@ |
|
|
|
@* ************************* EDIT DIALOG ************************* *@ |
|
|
|
@if (HasUpdatePermission) |
|
|
|
{ |
|
|
|
<MudDialog @ref="_editDialog" Options="@(new DialogOptions { MaxWidth = MaxWidth.Medium, FullWidth = true, CloseOnEscapeKey = true })"> |
|
|
|
<MudDialog @ref="_editDialog" Options="@EditDialogOptions"> |
|
|
|
<TitleContent> |
|
|
|
<MudText Typo="Typo.h6">@L["Edit"]</MudText> |
|
|
|
</TitleContent> |
|
|
|
|
|
|
|
@ -43,7 +43,7 @@ |
|
|
|
@* ************************* CREATE DIALOG ************************* *@ |
|
|
|
@if (HasCreatePermission) |
|
|
|
{ |
|
|
|
<MudDialog @ref="_createDialog" Options="@(new DialogOptions { MaxWidth = MaxWidth.Medium, FullWidth = true, CloseOnEscapeKey = true })"> |
|
|
|
<MudDialog @ref="_createDialog" Options="@CreateDialogOptions"> |
|
|
|
<TitleContent> |
|
|
|
<MudText Typo="Typo.h6">@L["NewUser"]</MudText> |
|
|
|
</TitleContent> |
|
|
|
@ -107,7 +107,7 @@ |
|
|
|
@* ************************* EDIT DIALOG ************************* *@ |
|
|
|
@if (HasUpdatePermission) |
|
|
|
{ |
|
|
|
<MudDialog @ref="_editDialog" Options="@(new DialogOptions { MaxWidth = MaxWidth.Medium, FullWidth = true, CloseOnEscapeKey = true })"> |
|
|
|
<MudDialog @ref="_editDialog" Options="@EditDialogOptions"> |
|
|
|
<TitleContent> |
|
|
|
<MudText Typo="Typo.h6">@L["Edit"]</MudText> |
|
|
|
</TitleContent> |
|
|
|
|
|
|
|
@ -3,7 +3,7 @@ |
|
|
|
@using JetBrains.Annotations |
|
|
|
@using Volo.Abp.PermissionManagement.Localization |
|
|
|
|
|
|
|
<MudDialog @bind-Visible="@_isVisible" Options="@(new DialogOptions { MaxWidth = MaxWidth.Large, FullWidth = true, CloseOnEscapeKey = true })"> |
|
|
|
<MudDialog @bind-Visible="@_isVisible" Options="@(new DialogOptions { MaxWidth = MaxWidth.Large, FullWidth = true, CloseOnEscapeKey = true, BackdropClick = false })"> |
|
|
|
<TitleContent> |
|
|
|
<MudText Typo="Typo.h6">@L["Permissions"] - @_entityDisplayName</MudText> |
|
|
|
</TitleContent> |
|
|
|
|
|
|
|
@ -1,7 +1,7 @@ |
|
|
|
@using global::MudBlazor |
|
|
|
@inherits Volo.Abp.AspNetCore.Components.AbpComponentBase |
|
|
|
|
|
|
|
<MudDialog @bind-Visible="@_isVisible" Options="@(new DialogOptions { MaxWidth = MaxWidth.ExtraLarge, FullWidth = true, CloseOnEscapeKey = true })"> |
|
|
|
<MudDialog @bind-Visible="@_isVisible" Options="@(new DialogOptions { MaxWidth = MaxWidth.ExtraLarge, FullWidth = true, CloseOnEscapeKey = true, BackdropClick = false })"> |
|
|
|
<TitleContent> |
|
|
|
<MudText Typo="Typo.h6">@L["ResourcePermissions"] - @ResourceDisplayName</MudText> |
|
|
|
</TitleContent> |
|
|
|
@ -82,7 +82,7 @@ |
|
|
|
@* Create Resource Permission Dialog *@ |
|
|
|
@if (_createDialogVisible) |
|
|
|
{ |
|
|
|
<MudDialog @bind-Visible="@_createDialogVisible" Options="@(new DialogOptions { MaxWidth = MaxWidth.Medium, FullWidth = true, CloseOnEscapeKey = true })"> |
|
|
|
<MudDialog @bind-Visible="@_createDialogVisible" Options="@(new DialogOptions { MaxWidth = MaxWidth.Medium, FullWidth = true, CloseOnEscapeKey = true, BackdropClick = false })"> |
|
|
|
<TitleContent> |
|
|
|
<MudText Typo="Typo.h6">@L["AddResourcePermission"]</MudText> |
|
|
|
</TitleContent> |
|
|
|
@ -127,7 +127,7 @@ |
|
|
|
@* Edit Resource Permission Dialog *@ |
|
|
|
@if (_editDialogVisible) |
|
|
|
{ |
|
|
|
<MudDialog @bind-Visible="@_editDialogVisible" Options="@(new DialogOptions { MaxWidth = MaxWidth.Medium, FullWidth = true, CloseOnEscapeKey = true })"> |
|
|
|
<MudDialog @bind-Visible="@_editDialogVisible" Options="@(new DialogOptions { MaxWidth = MaxWidth.Medium, FullWidth = true, CloseOnEscapeKey = true, BackdropClick = false })"> |
|
|
|
<TitleContent> |
|
|
|
<MudText Typo="Typo.h6">@L["UpdateResourcePermission"]</MudText> |
|
|
|
</TitleContent> |
|
|
|
|
|
|
|
@ -31,7 +31,7 @@ |
|
|
|
@* ************************* CREATE MODAL ************************* *@ |
|
|
|
@if (HasCreatePermission) |
|
|
|
{ |
|
|
|
<MudDialog @ref="_createDialog" Options="@(new DialogOptions { MaxWidth = MaxWidth.Medium, FullWidth = true, CloseOnEscapeKey = true })"> |
|
|
|
<MudDialog @ref="_createDialog" Options="@CreateDialogOptions"> |
|
|
|
<TitleContent> |
|
|
|
<MudText Typo="Typo.h6">@L["NewTenant"]</MudText> |
|
|
|
</TitleContent> |
|
|
|
@ -68,7 +68,7 @@ |
|
|
|
@* ************************* EDIT MODAL ************************* *@ |
|
|
|
@if (HasUpdatePermission) |
|
|
|
{ |
|
|
|
<MudDialog @ref="_editDialog" Options="@(new DialogOptions { MaxWidth = MaxWidth.Medium, FullWidth = true, CloseOnEscapeKey = true })"> |
|
|
|
<MudDialog @ref="_editDialog" Options="@EditDialogOptions"> |
|
|
|
<TitleContent> |
|
|
|
<MudText Typo="Typo.h6">@L["Edit"]</MudText> |
|
|
|
</TitleContent> |
|
|
|
|