liangshiwei
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with
62 additions and
20 deletions
-
modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/AbpAntDesignThemeOptions.cs
-
modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Themes/AntDesignTheme/App.razor
-
modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Themes/AntDesignTheme/DefaultLayout.razor
-
modules/FeatureManagement/Lsw.Abp.FeatureManagement.Blazor.AntDesignUI/Components/FeatureManagementModal.razor
-
modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/Pages/RoleManagement.razor
-
modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/Pages/UserManagement.razor
-
modules/SettingManagement/Lsw.Abp.SettingManagement.Blazor.AntDesignUI/Pages/SettingManagement/SettingManagement.razor
-
modules/TenantManagement/Lsw.Abp.TenantManagement.Blazor.AntDesignUI/Pages/TenantManagement.razor
-
samples/BookStore/src/BookStore.BlazorServer/BookStoreBlazorModule.cs
|
|
|
@ -7,6 +7,11 @@ public class AbpAntDesignThemeOptions |
|
|
|
{ |
|
|
|
public MenuOptions Menu { get; set; } |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 是否启用多标签页
|
|
|
|
/// </summary>
|
|
|
|
public bool EnableMultipleTabs { get; set; } |
|
|
|
|
|
|
|
public AbpAntDesignThemeOptions() |
|
|
|
{ |
|
|
|
Menu = new MenuOptions(); |
|
|
|
|
|
|
|
@ -5,18 +5,20 @@ |
|
|
|
<Router AppAssembly="RouterOptions.Value.AppAssembly" |
|
|
|
AdditionalAssemblies="RouterOptions.Value.AdditionalAssemblies"> |
|
|
|
<Found Context="routeData"> |
|
|
|
<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(DefaultLayout)"> |
|
|
|
<NotAuthorized> |
|
|
|
@if (!context.User.Identity.IsAuthenticated) |
|
|
|
{ |
|
|
|
<RedirectToLogin/> |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
<p>You are not authorized to access this resource.</p> |
|
|
|
} |
|
|
|
</NotAuthorized> |
|
|
|
</AuthorizeRouteView> |
|
|
|
<CascadingValue Value="routeData"> |
|
|
|
<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(DefaultLayout)"> |
|
|
|
<NotAuthorized> |
|
|
|
@if (!context.User.Identity.IsAuthenticated) |
|
|
|
{ |
|
|
|
<RedirectToLogin/> |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
<p>You are not authorized to access this resource.</p> |
|
|
|
} |
|
|
|
</NotAuthorized> |
|
|
|
</AuthorizeRouteView> |
|
|
|
</CascadingValue> |
|
|
|
</Found> |
|
|
|
<NotFound> |
|
|
|
<LayoutView Layout="@typeof(DefaultLayout)"> |
|
|
|
|
|
|
|
@ -58,7 +58,13 @@ else |
|
|
|
<Content Class="ant-design-content"> |
|
|
|
<PageAlert/> |
|
|
|
<div class="ant-design-body-content"> |
|
|
|
@Body |
|
|
|
@if (!Options.Value.EnableMultipleTabs){ |
|
|
|
@Body |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
<ReuseTabs Class="ant-design-body-reusetabs" TabPaneClass="ant-design-body-reusetabs-tabpane" Draggable></ReuseTabs> |
|
|
|
} |
|
|
|
</div> |
|
|
|
<UiPageProgress/> |
|
|
|
</Content> |
|
|
|
|
|
|
|
@ -1,9 +1,10 @@ |
|
|
|
@using AntDesign |
|
|
|
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme |
|
|
|
@using Microsoft.AspNetCore.Components |
|
|
|
@using Microsoft.Extensions.Localization |
|
|
|
@using Microsoft.Extensions.Options |
|
|
|
@using Volo.Abp.Validation.StringValues |
|
|
|
@inherits AbpFeatureManagementComponentBase |
|
|
|
|
|
|
|
<Modal Title="@L["Features"]" |
|
|
|
Visible="@_visible" |
|
|
|
OnOk="@SaveAsync" |
|
|
|
|
|
|
|
@ -1,14 +1,16 @@ |
|
|
|
@page "/identity/roles" |
|
|
|
@attribute [Authorize(IdentityPermissions.Roles.Default)] |
|
|
|
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme |
|
|
|
@using Microsoft.AspNetCore.Authorization |
|
|
|
@using Microsoft.Extensions.Options |
|
|
|
@using Volo.Abp.Identity |
|
|
|
@using Volo.Abp.Identity.Localization |
|
|
|
@using Lsw.Abp.PermissionManagement.Blazor.AntDesignUI.Components |
|
|
|
@using Volo.Abp.AspNetCore.Components.Web |
|
|
|
@inject AbpBlazorMessageLocalizerHelper<IdentityResource> LH |
|
|
|
@inherits AbpCrudPageBase<IIdentityRoleAppService, IdentityRoleDto, Guid, GetIdentityRolesInput, IdentityRoleCreateDto, IdentityRoleUpdateDto> |
|
|
|
|
|
|
|
<AbpPageHeader Title="@L["Roles"]" BreadcrumbItems="@BreadcrumbItems" Toolbar="@Toolbar"/> |
|
|
|
@implements IReuseTabsPage |
|
|
|
<AbpPageHeader Title="@L["Roles"]" BreadcrumbItems="@BreadcrumbItems" Toolbar="@Toolbar" /> |
|
|
|
|
|
|
|
<div class="page-content"> |
|
|
|
<AbpExtensibleDataGrid TItem="IdentityRoleDto" |
|
|
|
@ -69,4 +71,9 @@ |
|
|
|
@if (HasManagePermissionsPermission) |
|
|
|
{ |
|
|
|
<PermissionManagementModal @ref="PermissionManagementModal"/> |
|
|
|
} |
|
|
|
|
|
|
|
@code { |
|
|
|
public RenderFragment GetPageTitle() => |
|
|
|
@<div>@L["Roles"]</div>; |
|
|
|
} |
|
|
|
@ -1,13 +1,15 @@ |
|
|
|
@page "/identity/users" |
|
|
|
@attribute [Authorize(IdentityPermissions.Users.Default)] |
|
|
|
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme |
|
|
|
@using Microsoft.AspNetCore.Authorization |
|
|
|
@using Lsw.Abp.PermissionManagement.Blazor.AntDesignUI.Components |
|
|
|
@using Microsoft.Extensions.Options |
|
|
|
@using Volo.Abp.Identity |
|
|
|
@using Volo.Abp.Identity.Localization |
|
|
|
@inject AbpBlazorMessageLocalizerHelper<IdentityResource> LH |
|
|
|
@inherits AbpCrudPageBase<IIdentityUserAppService, IdentityUserDto, Guid, GetIdentityUsersInput, IdentityUserCreateDto, IdentityUserUpdateDto> |
|
|
|
|
|
|
|
<AbpPageHeader Title="@L["Users"]" BreadcrumbItems="@BreadcrumbItems" Toolbar="@Toolbar"/> |
|
|
|
@implements IReuseTabsPage |
|
|
|
<AbpPageHeader Title="@L["Users"]" BreadcrumbItems="@BreadcrumbItems" Toolbar="@Toolbar" /> |
|
|
|
|
|
|
|
<div class="page-content"> |
|
|
|
<AbpExtensibleDataGrid TItem="IdentityUserDto" |
|
|
|
@ -129,4 +131,9 @@ |
|
|
|
@if (HasManagePermissionsPermission) |
|
|
|
{ |
|
|
|
<PermissionManagementModal @ref="PermissionManagementModal"/> |
|
|
|
} |
|
|
|
|
|
|
|
@code { |
|
|
|
public RenderFragment GetPageTitle() => |
|
|
|
@<div>@L["Users"]</div>; |
|
|
|
} |
|
|
|
@ -1,11 +1,13 @@ |
|
|
|
@page "/setting-management" |
|
|
|
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme |
|
|
|
@using Microsoft.AspNetCore.Authorization |
|
|
|
@using Microsoft.Extensions.Options |
|
|
|
@using Volo.Abp.Features |
|
|
|
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Layout |
|
|
|
@using Volo.Abp.SettingManagement |
|
|
|
@attribute [Authorize] |
|
|
|
@attribute [RequiresFeature(SettingManagementFeatures.Enable)] |
|
|
|
|
|
|
|
@implements IReuseTabsPage |
|
|
|
<CascadingValue Value="this" IsFixed="true"> |
|
|
|
|
|
|
|
<AbpPageHeader Title="@L["Settings"]" BreadcrumbItems="@BreadcrumbItems"/> |
|
|
|
@ -32,3 +34,8 @@ |
|
|
|
</Tabs> |
|
|
|
</div> |
|
|
|
</CascadingValue> |
|
|
|
|
|
|
|
@code { |
|
|
|
public RenderFragment GetPageTitle() => |
|
|
|
@<div>@L["Settings"]</div>; |
|
|
|
} |
|
|
|
|
|
|
|
@ -8,6 +8,7 @@ |
|
|
|
@using Volo.Abp.TenantManagement |
|
|
|
@inject AbpBlazorMessageLocalizerHelper<AbpTenantManagementResource> LH |
|
|
|
@inherits AbpCrudPageBase<ITenantAppService, TenantDto, Guid, GetTenantsInput, TenantCreateDto, TenantUpdateDto> |
|
|
|
@implements IReuseTabsPage |
|
|
|
|
|
|
|
<AbpPageHeader Title="@L["Tenants"]" BreadcrumbItems="@BreadcrumbItems" Toolbar="@Toolbar"/> |
|
|
|
|
|
|
|
@ -63,4 +64,9 @@ |
|
|
|
@if (HasManageFeaturesPermission) |
|
|
|
{ |
|
|
|
<FeatureManagementModal @ref="FeatureManagementModal"/> |
|
|
|
} |
|
|
|
|
|
|
|
@code { |
|
|
|
public RenderFragment GetPageTitle() => |
|
|
|
@<div>@L["Tenants"]</div>; |
|
|
|
} |
|
|
|
@ -35,6 +35,7 @@ using Volo.Abp.UI.Navigation; |
|
|
|
using Volo.Abp.UI.Navigation.Urls; |
|
|
|
using Volo.Abp.VirtualFileSystem; |
|
|
|
using Volo.Abp.Timing; |
|
|
|
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme; |
|
|
|
|
|
|
|
namespace BookStore.Blazor; |
|
|
|
|
|
|
|
@ -75,7 +76,7 @@ public class BookStoreBlazorModule : AbpModule |
|
|
|
var configuration = context.Services.GetConfiguration(); |
|
|
|
|
|
|
|
Configure<AbpClockOptions>(options => options.Kind = DateTimeKind.Utc); |
|
|
|
|
|
|
|
Configure<AbpAntDesignThemeOptions>(options=> options.EnableMultipleTabs=true); |
|
|
|
ConfigureUrls(configuration); |
|
|
|
ConfigureBundles(); |
|
|
|
ConfigureAuthentication(context, configuration); |
|
|
|
|