@ -1,7 +1,110 @@ |
|||||
# Lsw.Abp.AntDesignUI |
# Lsw.Abp.AntDesignUI |
||||
|
|
||||
## Still in progress! |
**An Abp Blazor Theme based [Ant-Design-Blazor](https://github.com/ant-design-blazor/ant-design-blazor) !** |
||||
|
|
||||
An Abp Blazor Theme based [Ant-Design-Blazor](https://github.com/ant-design-blazor/ant-design-blazor) |
[](https://www.nuget.org/packages/Lsw.Abp.AntDesignUI/) |
||||
|
[](https://www.nuget.org/packages/Lsw.Abp.AntDesignUI/) |
||||
|
|
||||
 |
## Samples |
||||
|
|
||||
|
Check the [samples](/samples/BookStore/) |
||||
|
|
||||
|
 |
||||
|
 |
||||
|
|
||||
|
## Quick Start |
||||
|
|
||||
|
First step, Use ABP CLI to create a new project. |
||||
|
|
||||
|
`abp new BookStore -u blazor` |
||||
|
|
||||
|
> See the [ABP official documentation](https://docs.abp.io) learn [ABP framework](https://github.com/abpframework/abp). |
||||
|
|
||||
|
Open `BookStore.Blazor.csproj` and replace with the following: |
||||
|
|
||||
|
```csharp |
||||
|
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly"> |
||||
|
|
||||
|
<Import Project="..\..\common.props" /> |
||||
|
|
||||
|
<PropertyGroup> |
||||
|
<TargetFramework>net6.0</TargetFramework> |
||||
|
<BlazorWebAssemblyLoadAllGlobalizationData>true</BlazorWebAssemblyLoadAllGlobalizationData> |
||||
|
</PropertyGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.0" /> |
||||
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.0" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<PackageReference Include="Volo.Abp.Autofac.WebAssembly" Version="5.1.4" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<PackageReference Include="Lsw.Abp.IdentityManagement.Blazor.WebAssembly.AntDesignUI" Version="0.1.0" /> |
||||
|
<PackageReference Include="Lsw.Abp.SettingManagement.Blazor.WebAssembly.AntDesignUI" Version="0.1.0" /> |
||||
|
<PackageReference Include="Lsw.Abp.TenantManagement.Blazor.WebAssembly.AntDesignUI" Version="0.1.0" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<ProjectReference Include="..\..\src\BookStore.HttpApi.Client\BookStore.HttpApi.Client.csproj" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
</Project> |
||||
|
|
||||
|
``` |
||||
|
|
||||
|
Open `_Imports.razor` and add with the following: |
||||
|
|
||||
|
```csharp |
||||
|
@using AntDesign |
||||
|
@using Lsw.Abp.AntDesignUI |
||||
|
@using Lsw.Abp.AntDesignUI.Components |
||||
|
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Layout |
||||
|
``` |
||||
|
|
||||
|
Open `BookStoreBlazorModule` make the following changes: |
||||
|
|
||||
|
* Remove the `ConfigureBlazorise` method |
||||
|
* Fix wrong using namespace |
||||
|
* Update module dependencies |
||||
|
* For example, replace `AbpIdentityBlazorWebAssemblyModule` with `AbpIdentityBlazorWebAssemblyAntDesignModule` |
||||
|
|
||||
|
Open `BookStoreMenuContributor` to update icon: |
||||
|
|
||||
|
* `"fas fa-home"` to `IconType.Outline.Home` |
||||
|
* `"fa fa-cog"` to `IconType.Outline.Setting` |
||||
|
|
||||
|
Open `Index.razor` and replace with the following: |
||||
|
|
||||
|
```csharp |
||||
|
@page "/" |
||||
|
@inherits BookStoreComponentBase |
||||
|
|
||||
|
<AbpPageHeader Title="Index"></AbpPageHeader> |
||||
|
|
||||
|
<div class="page-content"> |
||||
|
<div style="text-align: center"> |
||||
|
|
||||
|
<Alert Type="@AlertType.Success" |
||||
|
Message="Success" |
||||
|
Description=" Congratulations, BookStore is successfully running!" |
||||
|
ShowIcon="true"/> |
||||
|
|
||||
|
<Divider/> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
``` |
||||
|
|
||||
|
Run the `abp bundle` command in the `BookStore.Blazor` folder. |
||||
|
|
||||
|
That all, enjoy your code :). |
||||
|
|
||||
|
 |
||||
|
|
||||
|
## Road map |
||||
|
|
||||
|
Updating... |
||||
@ -0,0 +1,11 @@ |
|||||
|
<Project> |
||||
|
<PropertyGroup> |
||||
|
<LangVersion>latest</LangVersion> |
||||
|
<Version>0.1</Version> |
||||
|
<!--TODO <PackageIconUrl></PackageIconUrl> --> |
||||
|
<PackageProjectUrl>https://github.com/realLiangshiwei/Lsw.Abp.AntDesignUI</PackageProjectUrl> |
||||
|
<PackageLicenseExpression>MIT</PackageLicenseExpression> |
||||
|
<RepositoryType>git</RepositoryType> |
||||
|
<RepositoryUrl>https://github.com/realLiangshiwei/Lsw.Abp.AntDesignUI</RepositoryUrl> |
||||
|
</PropertyGroup> |
||||
|
</Project> |
||||
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 65 KiB |
@ -0,0 +1,3 @@ |
|||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
|
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
|
</Weavers> |
||||
@ -0,0 +1,3 @@ |
|||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
|
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
|
</Weavers> |
||||
@ -0,0 +1,3 @@ |
|||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
|
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
|
</Weavers> |
||||
@ -0,0 +1,3 @@ |
|||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
|
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
|
</Weavers> |
||||
@ -0,0 +1,3 @@ |
|||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
|
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
|
</Weavers> |
||||
@ -0,0 +1,3 @@ |
|||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
|
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
|
</Weavers> |
||||
@ -1,3 +1,3 @@ |
|||||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
<ConfigureAwait /> |
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
</Weavers> |
</Weavers> |
||||
@ -1,3 +1,3 @@ |
|||||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
<ConfigureAwait /> |
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
</Weavers> |
</Weavers> |
||||
@ -1,3 +1,3 @@ |
|||||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
<ConfigureAwait /> |
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
</Weavers> |
</Weavers> |
||||
@ -0,0 +1,3 @@ |
|||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
|
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
|
</Weavers> |
||||
@ -0,0 +1,3 @@ |
|||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
|
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
|
</Weavers> |
||||
@ -0,0 +1,3 @@ |
|||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
|
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
|
</Weavers> |
||||
@ -0,0 +1,3 @@ |
|||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
|
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
|
</Weavers> |
||||
@ -1,5 +1,8 @@ |
|||||
<Project Sdk="Microsoft.NET.Sdk.Razor"> |
<Project Sdk="Microsoft.NET.Sdk.Razor"> |
||||
|
|
||||
|
<Import Project="..\..\..\common.props" /> |
||||
|
<Import Project="..\..\..\configureawait.props" /> |
||||
|
|
||||
<PropertyGroup> |
<PropertyGroup> |
||||
<TargetFramework>net6.0</TargetFramework> |
<TargetFramework>net6.0</TargetFramework> |
||||
</PropertyGroup> |
</PropertyGroup> |
||||
0
modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/Pages/SettingManagement/AntDesignThemeGroup/AntDesignThemeGroupViewComponent.razor → modules/SettingManagement/Lsw.Abp.SettingManagement.Blazor.AntDesignUI/Pages/SettingManagement/AntDesignThemeGroup/AntDesignThemeGroupViewComponent.razor
2
modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/Pages/SettingManagement/AntDesignThemeGroup/AntDesignThemeGroupViewComponent.razor.cs → modules/SettingManagement/Lsw.Abp.SettingManagement.Blazor.AntDesignUI/Pages/SettingManagement/AntDesignThemeGroup/AntDesignThemeGroupViewComponent.razor.cs
0
modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/Pages/SettingManagement/EmailSettingGroup/EmailSettingGroupViewComponent.razor → modules/SettingManagement/Lsw.Abp.SettingManagement.Blazor.AntDesignUI/Pages/SettingManagement/EmailSettingGroup/EmailSettingGroupViewComponent.razor
5
modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/Pages/SettingManagement/EmailSettingGroup/EmailSettingGroupViewComponent.razor.cs → modules/SettingManagement/Lsw.Abp.SettingManagement.Blazor.AntDesignUI/Pages/SettingManagement/EmailSettingGroup/EmailSettingGroupViewComponent.razor.cs
@ -1,12 +1,11 @@ |
|||||
using System; |
using System; |
||||
using System.Threading.Tasks; |
using System.Threading.Tasks; |
||||
using AutoMapper; |
|
||||
using Microsoft.AspNetCore.Components; |
using Microsoft.AspNetCore.Components; |
||||
using Volo.Abp.AspNetCore.Components.Messages; |
|
||||
using Volo.Abp.AspNetCore.Components.Web.Configuration; |
using Volo.Abp.AspNetCore.Components.Web.Configuration; |
||||
|
using Volo.Abp.SettingManagement; |
||||
using Volo.Abp.SettingManagement.Localization; |
using Volo.Abp.SettingManagement.Localization; |
||||
|
|
||||
namespace Volo.Abp.SettingManagement.Blazor.AntDesignUI.Pages.SettingManagement.EmailSettingGroup; |
namespace Lsw.Abp.SettingManagement.Blazor.AntDesignUI.Pages.SettingManagement.EmailSettingGroup; |
||||
|
|
||||
public partial class EmailSettingGroupViewComponent |
public partial class EmailSettingGroupViewComponent |
||||
{ |
{ |
||||
@ -1,16 +1,14 @@ |
|||||
using System; |
using System; |
||||
using System.Collections.Generic; |
using System.Collections.Generic; |
||||
using System.Linq; |
|
||||
using System.Threading.Tasks; |
using System.Threading.Tasks; |
||||
using AntDesign; |
|
||||
using Lsw.Abp.AntDesignUI; |
using Lsw.Abp.AntDesignUI; |
||||
using Microsoft.AspNetCore.Components; |
using Microsoft.AspNetCore.Components; |
||||
using Microsoft.Extensions.Localization; |
using Microsoft.Extensions.Localization; |
||||
using Microsoft.Extensions.Options; |
using Microsoft.Extensions.Options; |
||||
using Volo.Abp.SettingManagement.Blazor.AntDesignUI.Pages.SettingManagement.AntDesignThemeGroup; |
using Volo.Abp.SettingManagement.Blazor; |
||||
using Volo.Abp.SettingManagement.Localization; |
using Volo.Abp.SettingManagement.Localization; |
||||
|
|
||||
namespace Volo.Abp.SettingManagement.Blazor.AntDesignUI.Pages.SettingManagement; |
namespace Lsw.Abp.SettingManagement.Blazor.AntDesignUI.Pages.SettingManagement; |
||||
|
|
||||
public partial class SettingManagement |
public partial class SettingManagement |
||||
{ |
{ |
||||
@ -1,6 +1,7 @@ |
|||||
using AutoMapper; |
using AutoMapper; |
||||
|
using Volo.Abp.SettingManagement; |
||||
|
|
||||
namespace Volo.Abp.SettingManagement.Blazor.AntDesignUI; |
namespace Lsw.Abp.SettingManagement.Blazor.AntDesignUI; |
||||
|
|
||||
public class SettingManagementBlazorAutoMapperProfile : Profile |
public class SettingManagementBlazorAutoMapperProfile : Profile |
||||
{ |
{ |
||||
@ -1,7 +1,6 @@ |
|||||
// ReSharper disable once CheckNamespace
|
using System.Collections.Generic; |
||||
|
|
||||
using System.Collections.Generic; |
|
||||
|
|
||||
|
// ReSharper disable once CheckNamespace
|
||||
namespace Volo.Abp.SettingManagement.Blazor; |
namespace Volo.Abp.SettingManagement.Blazor; |
||||
|
|
||||
public class SettingManagementComponentOptions |
public class SettingManagementComponentOptions |
||||
@ -1,4 +1,4 @@ |
|||||
namespace Volo.Abp.SettingManagement.Blazor.AntDesignUI; |
namespace Lsw.Abp.SettingManagement.Blazor.AntDesignUI; |
||||
|
|
||||
public class SettingManagementMenus |
public class SettingManagementMenus |
||||
{ |
{ |
||||
@ -1,14 +1,14 @@ |
|||||
using Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme; |
using Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme; |
||||
using Volo.Abp.Modularity; |
using Volo.Abp.Modularity; |
||||
using Volo.Abp.SettingManagement.Blazor.AntDesignUI; |
using Lsw.Abp.SettingManagement.Blazor.AntDesignUI; |
||||
|
|
||||
namespace Volo.Abp.SettingManagement.Blazor.Server.AntDesignUI; |
namespace Lsw.Abp.SettingManagement.Blazor.Server.AntDesignUI; |
||||
|
|
||||
[DependsOn( |
[DependsOn( |
||||
typeof(AbpSettingManagementBlazorAntDesignModule), |
typeof(AbpSettingManagementBlazorAntDesignModule), |
||||
typeof(AbpAspNetCoreComponentsServerAntDesignThemeModule) |
typeof(AbpAspNetCoreComponentsServerAntDesignThemeModule) |
||||
)] |
)] |
||||
public class AbpSettingManagementBlazorWebAssemblyAntDesignModule : AbpModule |
public class AbpSettingManagementBlazorServerAntDesignModule : AbpModule |
||||
{ |
{ |
||||
|
|
||||
} |
} |
||||
@ -0,0 +1,3 @@ |
|||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
|
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
|
</Weavers> |
||||
@ -1,12 +1,15 @@ |
|||||
<Project Sdk="Microsoft.NET.Sdk.Razor"> |
<Project Sdk="Microsoft.NET.Sdk.Razor"> |
||||
|
|
||||
|
<Import Project="..\..\..\common.props" /> |
||||
|
<Import Project="..\..\..\configureawait.props" /> |
||||
|
|
||||
<PropertyGroup> |
<PropertyGroup> |
||||
<TargetFramework>net6.0</TargetFramework> |
<TargetFramework>net6.0</TargetFramework> |
||||
</PropertyGroup> |
</PropertyGroup> |
||||
|
|
||||
<ItemGroup> |
<ItemGroup> |
||||
<ProjectReference Include="..\..\Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme\Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme.csproj" /> |
<ProjectReference Include="..\..\Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme\Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme.csproj" /> |
||||
<ProjectReference Include="..\Volo.Abp.SettingManagement.Blazor.AntDesignUI\Volo.Abp.SettingManagement.Blazor.AntDesignUI.csproj" /> |
<ProjectReference Include="..\Lsw.Abp.SettingManagement.Blazor.AntDesignUI\Lsw.Abp.SettingManagement.Blazor.AntDesignUI.csproj" /> |
||||
</ItemGroup> |
</ItemGroup> |
||||
|
|
||||
</Project> |
</Project> |
||||
@ -1,8 +1,9 @@ |
|||||
using Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme; |
using Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme; |
||||
using Volo.Abp.Modularity; |
using Volo.Abp.Modularity; |
||||
using Volo.Abp.SettingManagement.Blazor.AntDesignUI; |
using Lsw.Abp.SettingManagement.Blazor.AntDesignUI; |
||||
|
using Volo.Abp.SettingManagement; |
||||
|
|
||||
namespace Volo.Abp.SettingManagement.Blazor.WebAssembly.AntDesignUI; |
namespace Lsw.Abp.SettingManagement.Blazor.WebAssembly.AntDesignUI; |
||||
|
|
||||
[DependsOn( |
[DependsOn( |
||||
typeof(AbpSettingManagementBlazorAntDesignModule), |
typeof(AbpSettingManagementBlazorAntDesignModule), |
||||
@ -0,0 +1,3 @@ |
|||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
|
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
|
</Weavers> |
||||
@ -0,0 +1,3 @@ |
|||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
|
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
|
</Weavers> |
||||
@ -0,0 +1,3 @@ |
|||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
|
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
|
</Weavers> |
||||
@ -0,0 +1,3 @@ |
|||||
|
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
||||
|
<ConfigureAwait ContinueOnCapturedContext="false" /> |
||||
|
</Weavers> |
||||
@ -1,12 +0,0 @@ |
|||||
using Volo.Abp.DependencyInjection; |
|
||||
using Volo.Abp.Ui.Branding; |
|
||||
|
|
||||
namespace AntDesignUIApp; |
|
||||
|
|
||||
[Dependency(ReplaceServices = true)] |
|
||||
public class AntDesignAppBrandBrandingProvider : DefaultBrandingProvider |
|
||||
{ |
|
||||
public override string AppName => "AntDesignApp"; |
|
||||
|
|
||||
public override string LogoUrl => "logo.svg"; |
|
||||
} |
|
||||
@ -1,19 +0,0 @@ |
|||||
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly"> |
|
||||
|
|
||||
<PropertyGroup> |
|
||||
<TargetFramework>net6.0</TargetFramework> |
|
||||
<Nullable>enable</Nullable> |
|
||||
<ImplicitUsings>enable</ImplicitUsings> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.1" /> |
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.1" PrivateAssets="all" /> |
|
||||
<PackageReference Include="Volo.Abp.Autofac.WebAssembly" Version="5.1.4" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<ProjectReference Include="..\..\modules\Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme\Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme.csproj" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
</Project> |
|
||||
@ -1,36 +0,0 @@ |
|||||
using Volo.Abp.UI.Navigation; |
|
||||
|
|
||||
namespace AntDesignUIApp; |
|
||||
|
|
||||
public class AntDesignUiAppMenuContributor : IMenuContributor |
|
||||
{ |
|
||||
public Task ConfigureMenuAsync(MenuConfigurationContext context) |
|
||||
{ |
|
||||
if (context.Menu.Name == StandardMenus.Main) |
|
||||
{ |
|
||||
context.Menu.Items.Insert( |
|
||||
0, |
|
||||
new ApplicationMenuItem( |
|
||||
"Home", |
|
||||
"Home", |
|
||||
"/", |
|
||||
icon: "home" |
|
||||
) |
|
||||
); |
|
||||
|
|
||||
var admin = new ApplicationMenuItem("Admin", "Admin"); |
|
||||
|
|
||||
admin.AddItem(new ApplicationMenuItem("Users", |
|
||||
"Users", |
|
||||
"/Users")); |
|
||||
|
|
||||
admin.AddItem(new ApplicationMenuItem("Roles", |
|
||||
"Roles", |
|
||||
"/Roles")); |
|
||||
|
|
||||
context.Menu.AddItem(admin); |
|
||||
} |
|
||||
|
|
||||
return Task.CompletedTask; |
|
||||
} |
|
||||
} |
|
||||
@ -1,51 +0,0 @@ |
|||||
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Routing; |
|
||||
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Themes.AntDesignTheme; |
|
||||
using Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme; |
|
||||
using Microsoft.AspNetCore.Components.Authorization; |
|
||||
using Microsoft.AspNetCore.Components.WebAssembly.Hosting; |
|
||||
using Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ClientProxies; |
|
||||
using Volo.Abp.Autofac.WebAssembly; |
|
||||
using Volo.Abp.Modularity; |
|
||||
using Volo.Abp.UI.Navigation; |
|
||||
|
|
||||
namespace AntDesignUIApp; |
|
||||
|
|
||||
[DependsOn( |
|
||||
typeof(AbpAutofacWebAssemblyModule), |
|
||||
typeof(AbpAspNetCoreComponentsWebAssemblyAntDesignThemeModule))] |
|
||||
public class AntDesignUIAppModule : AbpModule |
|
||||
{ |
|
||||
public override void ConfigureServices(ServiceConfigurationContext context) |
|
||||
{ |
|
||||
var environment = context.Services.GetSingletonInstance<IWebAssemblyHostEnvironment>(); |
|
||||
var builder = context.Services.GetSingletonInstance<WebAssemblyHostBuilder>(); |
|
||||
|
|
||||
Configure<AbpRouterOptions>(options => |
|
||||
{ |
|
||||
options.AppAssembly = typeof(AntDesignUIAppModule).Assembly; |
|
||||
}); |
|
||||
|
|
||||
Configure<AbpNavigationOptions>(options => |
|
||||
{ |
|
||||
options.MenuContributors.Add(new AntDesignUiAppMenuContributor()); |
|
||||
}); |
|
||||
|
|
||||
|
|
||||
context.Services.AddTransient(sp => new HttpClient |
|
||||
{ |
|
||||
BaseAddress = new Uri(environment.BaseAddress) |
|
||||
}); |
|
||||
|
|
||||
context.Services.AddAuthorizationCore(); |
|
||||
context.Services.AddAlwaysAllowAuthorization(); |
|
||||
context.Services.AddScoped<AuthenticationStateProvider, FakeAuthStateProvider>(); |
|
||||
|
|
||||
builder.RootComponents.Add<AppWithoutAuth>("#ApplicationContainer"); |
|
||||
|
|
||||
context.Services.RemoveAll(x => x.ImplementationType == typeof(AbpApplicationConfigurationClientProxy)); |
|
||||
|
|
||||
context.Services.AddTransient<AbpApplicationConfigurationClientProxy, FakeAbpApplicationConfigurationAppService>(); |
|
||||
|
|
||||
|
|
||||
} |
|
||||
} |
|
||||
@ -1,33 +0,0 @@ |
|||||
using Volo.Abp.AspNetCore.Components.WebAssembly; |
|
||||
using Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations; |
|
||||
using Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ClientProxies; |
|
||||
using Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending; |
|
||||
using Volo.Abp.AspNetCore.Mvc.MultiTenancy; |
|
||||
using Volo.Abp.DependencyInjection; |
|
||||
|
|
||||
namespace AntDesignUIApp; |
|
||||
|
|
||||
public class FakeAbpApplicationConfigurationAppService : AbpApplicationConfigurationClientProxy |
|
||||
{ |
|
||||
public override Task<ApplicationConfigurationDto> GetAsync() |
|
||||
{ |
|
||||
var result = new ApplicationConfigurationDto() |
|
||||
{ |
|
||||
Setting =new ApplicationSettingConfigurationDto(), |
|
||||
Auth = new ApplicationAuthConfigurationDto(), |
|
||||
Clock = new ClockDto(), |
|
||||
CurrentTenant = new CurrentTenantDto(), |
|
||||
CurrentUser = new CurrentUserDto() |
|
||||
{ |
|
||||
Name = "admin", |
|
||||
UserName = "admin" |
|
||||
}, |
|
||||
Features = new ApplicationFeatureConfigurationDto(), |
|
||||
Localization = new ApplicationLocalizationConfigurationDto(), |
|
||||
MultiTenancy = new MultiTenancyInfoDto(), |
|
||||
ObjectExtensions = new ObjectExtensionsDto(), |
|
||||
Timing = new TimingDto() |
|
||||
}; |
|
||||
return Task.FromResult(result); |
|
||||
} |
|
||||
} |
|
||||
@ -1,13 +0,0 @@ |
|||||
using System.Security.Claims; |
|
||||
using Microsoft.AspNetCore.Components.Authorization; |
|
||||
|
|
||||
namespace AntDesignUIApp; |
|
||||
|
|
||||
public class FakeAuthStateProvider : AuthenticationStateProvider |
|
||||
{ |
|
||||
public override async Task<AuthenticationState> GetAuthenticationStateAsync() |
|
||||
{ |
|
||||
var anonymous = new ClaimsIdentity(); |
|
||||
return await Task.FromResult(new AuthenticationState(new ClaimsPrincipal(anonymous))); |
|
||||
} |
|
||||
} |
|
||||
@ -1,14 +0,0 @@ |
|||||
@page "/" |
|
||||
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Settings |
|
||||
|
|
||||
<AbpPageHeader Title="Index" BreadcrumbItems="@BreadcrumbItems" Toolbar="@Toolbar"/> |
|
||||
|
|
||||
<div class="page-content"> |
|
||||
<h4>Menu Placement</h4> |
|
||||
<Button Type="@ButtonType.Primary" OnClick="() => ChangeMenuPlacement(MenuPlacement.Top)">Top</Button> |
|
||||
<Button Type="@ButtonType.Primary" OnClick="() => ChangeMenuPlacement(MenuPlacement.Left)">Left</Button> |
|
||||
|
|
||||
<h4>Menu Theme</h4> |
|
||||
<Button Type="@ButtonType.Primary" OnClick="() => ChangeMenuTheme(MenuTheme.Dark)">Dark</Button> |
|
||||
<Button Type="@ButtonType.Primary" OnClick="() => ChangeMenuTheme(MenuTheme.Light)">Light</Button> |
|
||||
</div> |
|
||||
@ -1,65 +0,0 @@ |
|||||
using AntDesign; |
|
||||
using Lsw.Abp.AntDesignUI; |
|
||||
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme; |
|
||||
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.PageToolbars; |
|
||||
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Settings; |
|
||||
using Microsoft.AspNetCore.Components; |
|
||||
using Microsoft.Extensions.Options; |
|
||||
using Volo.Abp.AspNetCore.Components.Notifications; |
|
||||
using Volo.Abp.AspNetCore.Components.Progression; |
|
||||
|
|
||||
namespace AntDesignUIApp.Pages; |
|
||||
|
|
||||
public partial class Index : ComponentBase |
|
||||
{ |
|
||||
public List<AbpBreadcrumbItem> BreadcrumbItems { get; set; } = new(); |
|
||||
|
|
||||
public PageToolbar Toolbar { get; set; } = new(); |
|
||||
|
|
||||
[Inject] |
|
||||
public IUiNotificationService NotificationService { get; set; } |
|
||||
|
|
||||
[Inject] |
|
||||
public IUiPageProgressService UiPageProgressService { get; set; } |
|
||||
|
|
||||
[Inject] |
|
||||
protected IOptions<AbpAntDesignThemeOptions> Options { get; set; } |
|
||||
|
|
||||
[Inject] |
|
||||
protected IAntDesignSettingsProvider AntDesignSettingsProvider { get; set; } |
|
||||
|
|
||||
protected override void OnInitialized() |
|
||||
{ |
|
||||
BreadcrumbItems = new List<AbpBreadcrumbItem>() |
|
||||
{ |
|
||||
new("Index") |
|
||||
}; |
|
||||
|
|
||||
Toolbar.AddButton("Notification", () => NotificationService.Info("new item!"), "plus"); |
|
||||
Toolbar.AddButton("Page progress", async () => |
|
||||
{ |
|
||||
var i = 0; |
|
||||
|
|
||||
while (i < 100) |
|
||||
{ |
|
||||
i++; |
|
||||
await UiPageProgressService.Go(i); |
|
||||
await Task.Delay(50); |
|
||||
} |
|
||||
|
|
||||
await UiPageProgressService.Go(null); |
|
||||
}, "double-right"); |
|
||||
} |
|
||||
|
|
||||
private async Task ChangeMenuPlacement(MenuPlacement menuPlacement) |
|
||||
{ |
|
||||
Options.Value.Menu.Placement = menuPlacement; |
|
||||
await AntDesignSettingsProvider.TriggerSettingChanged(); |
|
||||
} |
|
||||
|
|
||||
private async Task ChangeMenuTheme(MenuTheme menuTheme) |
|
||||
{ |
|
||||
Options.Value.Menu.Theme = menuTheme; |
|
||||
await AntDesignSettingsProvider.TriggerSettingChanged(); |
|
||||
} |
|
||||
} |
|
||||
@ -1,6 +0,0 @@ |
|||||
@page "/roles" |
|
||||
|
|
||||
<AbpPageHeader Title="Roles" BreadcrumbItems="@BreadcrumbItems"/> |
|
||||
<div class="page-content"> |
|
||||
<p>Role page</p> |
|
||||
</div> |
|
||||
@ -1,18 +0,0 @@ |
|||||
using Lsw.Abp.AntDesignUI; |
|
||||
using Microsoft.AspNetCore.Components; |
|
||||
|
|
||||
namespace AntDesignUIApp.Pages; |
|
||||
|
|
||||
public partial class Roles : ComponentBase |
|
||||
{ |
|
||||
public List<AbpBreadcrumbItem> BreadcrumbItems { get; set; } = new(); |
|
||||
|
|
||||
protected override void OnInitialized() |
|
||||
{ |
|
||||
BreadcrumbItems = new List<AbpBreadcrumbItem>() |
|
||||
{ |
|
||||
new("Admin"), |
|
||||
new("Roles") |
|
||||
}; |
|
||||
} |
|
||||
} |
|
||||
@ -1,6 +0,0 @@ |
|||||
@page "/users" |
|
||||
|
|
||||
<AbpPageHeader Title="Users" BreadcrumbItems="@BreadcrumbItems"/> |
|
||||
<div class="page-content"> |
|
||||
<p>Users page</p> |
|
||||
</div> |
|
||||
@ -1,18 +0,0 @@ |
|||||
using Lsw.Abp.AntDesignUI; |
|
||||
using Microsoft.AspNetCore.Components; |
|
||||
|
|
||||
namespace AntDesignUIApp.Pages; |
|
||||
|
|
||||
public partial class Users : ComponentBase |
|
||||
{ |
|
||||
public List<AbpBreadcrumbItem> BreadcrumbItems { get; set; } = new(); |
|
||||
|
|
||||
protected override void OnInitialized() |
|
||||
{ |
|
||||
BreadcrumbItems = new List<AbpBreadcrumbItem>() |
|
||||
{ |
|
||||
new("Admin"), |
|
||||
new("Users") |
|
||||
}; |
|
||||
} |
|
||||
} |
|
||||
@ -1,16 +0,0 @@ |
|||||
using Microsoft.AspNetCore.Components.Web; |
|
||||
using Microsoft.AspNetCore.Components.WebAssembly.Hosting; |
|
||||
using AntDesignUIApp; |
|
||||
|
|
||||
var builder = WebAssemblyHostBuilder.CreateDefault(args); |
|
||||
|
|
||||
var application = await builder.AddApplicationAsync<AntDesignUIAppModule>(options => |
|
||||
{ |
|
||||
options.UseAutofac(); |
|
||||
}); |
|
||||
|
|
||||
var host = builder.Build(); |
|
||||
|
|
||||
await application.InitializeApplicationAsync(host.Services); |
|
||||
|
|
||||
await host.RunAsync(); |
|
||||
@ -1,30 +0,0 @@ |
|||||
{ |
|
||||
"iisSettings": { |
|
||||
"windowsAuthentication": false, |
|
||||
"anonymousAuthentication": true, |
|
||||
"iisExpress": { |
|
||||
"applicationUrl": "http://localhost:35665", |
|
||||
"sslPort": 44353 |
|
||||
} |
|
||||
}, |
|
||||
"profiles": { |
|
||||
"AntDesignUIApp": { |
|
||||
"commandName": "Project", |
|
||||
"dotnetRunMessages": true, |
|
||||
"launchBrowser": true, |
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", |
|
||||
"applicationUrl": "https://localhost:7161;http://localhost:5161", |
|
||||
"environmentVariables": { |
|
||||
"ASPNETCORE_ENVIRONMENT": "Development" |
|
||||
} |
|
||||
}, |
|
||||
"IIS Express": { |
|
||||
"commandName": "IISExpress", |
|
||||
"launchBrowser": true, |
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", |
|
||||
"environmentVariables": { |
|
||||
"ASPNETCORE_ENVIRONMENT": "Development" |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,14 +0,0 @@ |
|||||
@using System.Net.Http |
|
||||
@using System.Net.Http.Json |
|
||||
@using Microsoft.AspNetCore.Authorization |
|
||||
@using Microsoft.AspNetCore.Components.Authorization |
|
||||
@using Microsoft.AspNetCore.Components.Forms |
|
||||
@using Microsoft.AspNetCore.Components.Routing |
|
||||
@using Microsoft.AspNetCore.Components.Web |
|
||||
@using Microsoft.AspNetCore.Components.WebAssembly.Http |
|
||||
@using Microsoft.JSInterop |
|
||||
@using AntDesignUIApp |
|
||||
@using AntDesign |
|
||||
@using Lsw.Abp.AntDesignUI |
|
||||
@using Lsw.Abp.AntDesignUI.Components |
|
||||
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Layout; |
|
||||
@ -1,3 +0,0 @@ |
|||||
{ |
|
||||
|
|
||||
} |
|
||||
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
@ -1,27 +0,0 @@ |
|||||
<!DOCTYPE html> |
|
||||
<html> |
|
||||
|
|
||||
<head> |
|
||||
<meta charset="utf-8" /> |
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> |
|
||||
<title>AntDesignUIApp</title> |
|
||||
<base href="/" /> |
|
||||
|
|
||||
<!--ABP:Styles--> |
|
||||
<link href="global.css?_v=637820998049203967" rel="stylesheet"/> |
|
||||
<!--/ABP:Styles--> |
|
||||
</head> |
|
||||
|
|
||||
<body class="abp-application-layout bg-light"> |
|
||||
<div id="ApplicationContainer"> |
|
||||
<div class="spinner"> |
|
||||
<div class="double-bounce1"></div> |
|
||||
<div class="double-bounce2"></div> |
|
||||
</div> |
|
||||
</div> |
|
||||
|
|
||||
<!--ABP:Scripts--> |
|
||||
<script src="global.js?_v=637820998050943368"></script> |
|
||||
<!--/ABP:Scripts--> |
|
||||
</body> |
|
||||
</html> |
|
||||
|
Before Width: | Height: | Size: 4.6 KiB |
@ -1,27 +0,0 @@ |
|||||
[ |
|
||||
{ |
|
||||
"date": "2018-05-06", |
|
||||
"temperatureC": 1, |
|
||||
"summary": "Freezing" |
|
||||
}, |
|
||||
{ |
|
||||
"date": "2018-05-07", |
|
||||
"temperatureC": 14, |
|
||||
"summary": "Bracing" |
|
||||
}, |
|
||||
{ |
|
||||
"date": "2018-05-08", |
|
||||
"temperatureC": -13, |
|
||||
"summary": "Freezing" |
|
||||
}, |
|
||||
{ |
|
||||
"date": "2018-05-09", |
|
||||
"temperatureC": -16, |
|
||||
"summary": "Balmy" |
|
||||
}, |
|
||||
{ |
|
||||
"date": "2018-05-10", |
|
||||
"temperatureC": -2, |
|
||||
"summary": "Chilly" |
|
||||
} |
|
||||
] |
|
||||