Skip to content

Commit

Permalink
Release 0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
realLiangshiwei committed Mar 6, 2022
1 parent ae4be7a commit a1f16f7
Show file tree
Hide file tree
Showing 97 changed files with 270 additions and 670 deletions.
109 changes: 106 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,110 @@
# 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)
[![NuGet](https://img.shields.io/nuget/v/Lsw.Abp.AntDesignUI.svg)](https://www.nuget.org/packages/Lsw.Abp.AntDesignUI/)
[![NuGet](https://img.shields.io/nuget/dt/Lsw.Abp.AntDesignUI.svg)](https://www.nuget.org/packages/Lsw.Abp.AntDesignUI/)

![introduce](img/introduce.gif)
## Samples

Check the [samples](/samples/BookStore/)

![1](img/1.png)
![2](img/2.png)

## 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 :).

![3](img/3.png)

## Road map

Updating...
11 changes: 11 additions & 0 deletions common.props
Original file line number Diff line number Diff line change
@@ -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>
Binary file added img/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/left1.png
Binary file not shown.
Binary file removed img/left2.png
Binary file not shown.
Binary file removed img/top1.png
Binary file not shown.
Binary file removed img/top2.png
Binary file not shown.
15 changes: 3 additions & 12 deletions lsw.Abp.AntDesignUI.sln
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lsw.Abp.AspnetCore.Componen
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{E36D7268-C7A6-4A7F-81DB-57070F4B049C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{DA09D6FA-2DA0-4C76-AF49-BF24A015FF49}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntDesignUIApp", "test\AntDesignUIApp\AntDesignUIApp.csproj", "{62B99860-4CED-404F-A378-37B40043F10C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BookStore", "BookStore", "{1F85F600-70F9-4286-B8BD-6A124D9DC43D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookStore.Application", "samples\BookStore\src\BookStore.Application\BookStore.Application.csproj", "{39E479A5-92DB-4F5B-918A-1920886D4D60}"
Expand Down Expand Up @@ -74,11 +70,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lsw.Abp.TenantManagement.Bl
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SettingManagement", "SettingManagement", "{CCAB1F41-EAB4-4564-B956-C32ED0B03EC2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.SettingManagement.Blazor.AntDesignUI", "modules\SettingManagement\Volo.Abp.SettingManagement.Blazor.AntDesignUI\Volo.Abp.SettingManagement.Blazor.AntDesignUI.csproj", "{2E033BD6-16C2-4F3A-ADD5-C08D6FB8482B}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lsw.Abp.SettingManagement.Blazor.AntDesignUI", "modules\SettingManagement\Lsw.Abp.SettingManagement.Blazor.AntDesignUI\Lsw.Abp.SettingManagement.Blazor.AntDesignUI.csproj", "{2E033BD6-16C2-4F3A-ADD5-C08D6FB8482B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.SettingManagement.Blazor.WebAssembly.AntDesignUI", "modules\SettingManagement\Volo.Abp.SettingManagement.Blazor.WebAssembly.AntDesignUI\Volo.Abp.SettingManagement.Blazor.WebAssembly.AntDesignUI.csproj", "{3D8714C4-B78B-4B5E-8675-F6531C21AE2C}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lsw.Abp.SettingManagement.Blazor.WebAssembly.AntDesignUI", "modules\SettingManagement\Lsw.Abp.SettingManagement.Blazor.WebAssembly.AntDesignUI\Lsw.Abp.SettingManagement.Blazor.WebAssembly.AntDesignUI.csproj", "{3D8714C4-B78B-4B5E-8675-F6531C21AE2C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.SettingManagement.Blazor.Server.AntDesignUI", "modules\SettingManagement\Volo.Abp.SettingManagement.Blazor.Server.AntDesignUI\Volo.Abp.SettingManagement.Blazor.Server.AntDesignUI.csproj", "{F3ADEF50-755E-4FCB-9746-C946CB0306B3}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lsw.Abp.SettingManagement.Blazor.Server.AntDesignUI", "modules\SettingManagement\Lsw.Abp.SettingManagement.Blazor.Server.AntDesignUI\Lsw.Abp.SettingManagement.Blazor.Server.AntDesignUI.csproj", "{F3ADEF50-755E-4FCB-9746-C946CB0306B3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookStore.BlazorServer", "samples\BookStore\BookStore.BlazorServer\BookStore.BlazorServer.csproj", "{1E5B082C-96F6-44B4-856E-AC26A5395243}"
EndProject
Expand All @@ -92,7 +88,6 @@ Global
{75753009-1BE9-4994-8D2E-890829844C46} = {0C432416-770F-4331-84E6-5835408A9BD8}
{7C86BBAF-609E-4651-B1AF-FBF3EA669E3A} = {0C432416-770F-4331-84E6-5835408A9BD8}
{84F26612-0056-4CD1-849B-B0B8F046350D} = {0C432416-770F-4331-84E6-5835408A9BD8}
{62B99860-4CED-404F-A378-37B40043F10C} = {DA09D6FA-2DA0-4C76-AF49-BF24A015FF49}
{1F85F600-70F9-4286-B8BD-6A124D9DC43D} = {E36D7268-C7A6-4A7F-81DB-57070F4B049C}
{39E479A5-92DB-4F5B-918A-1920886D4D60} = {1F85F600-70F9-4286-B8BD-6A124D9DC43D}
{BBBBFA7B-B24D-4ED4-9DAE-71A60EDAA640} = {1F85F600-70F9-4286-B8BD-6A124D9DC43D}
Expand Down Expand Up @@ -143,10 +138,6 @@ Global
{84F26612-0056-4CD1-849B-B0B8F046350D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{84F26612-0056-4CD1-849B-B0B8F046350D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{84F26612-0056-4CD1-849B-B0B8F046350D}.Release|Any CPU.Build.0 = Release|Any CPU
{62B99860-4CED-404F-A378-37B40043F10C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{62B99860-4CED-404F-A378-37B40043F10C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62B99860-4CED-404F-A378-37B40043F10C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{62B99860-4CED-404F-A378-37B40043F10C}.Release|Any CPU.Build.0 = Release|Any CPU
{39E479A5-92DB-4F5B-918A-1920886D4D60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{39E479A5-92DB-4F5B-918A-1920886D4D60}.Debug|Any CPU.Build.0 = Debug|Any CPU
{39E479A5-92DB-4F5B-918A-1920886D4D60}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public virtual async Task OpenAsync([NotNull] string providerName, string provid
}
}
_visible = true;
StateHasChanged();
await InvokeAsync(StateHasChanged);
}
catch (Exception ex)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<Import Project="..\..\..\common.props" />
<Import Project="..\..\..\configureawait.props" />

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk.Razor">

<Import Project="..\..\..\common.props" />
<Import Project="..\..\..\configureawait.props" />

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<Import Project="..\..\..\common.props" />
<Import Project="..\..\..\configureawait.props" />

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<Import Project="..\..\..\common.props" />
<Import Project="..\..\..\configureawait.props" />

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<Import Project="..\..\..\common.props" />
<Import Project="..\..\..\configureawait.props" />

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<Import Project="..\..\..\common.props" />
<Import Project="..\..\..\configureawait.props" />

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">


<Import Project="..\..\common.props" />
<Import Project="..\..\configureawait.props" />

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">


<Import Project="..\..\common.props" />
<Import Project="..\..\configureawait.props" />

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ protected override async Task OnInitializedAsync()
protected virtual async Task OnSettingChanged()
{
await SetLayout();
StateHasChanged();
await InvokeAsync(StateHasChanged);
}

private async Task SetLayout()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<Import Project="..\..\common.props" />
<Import Project="..\..\configureawait.props" />

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public async Task OpenAsync(string providerName, string providerKey, string enti
_selectedTabName = GetNormalizedGroupName(_groups.First().Name);

_visible = true;
StateHasChanged();
await InvokeAsync(StateHasChanged);
}
catch (Exception ex)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<Import Project="..\..\..\common.props" />
<Import Project="..\..\..\configureawait.props" />

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<Import Project="..\..\..\common.props" />
<Import Project="..\..\..\configureawait.props" />

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<Import Project="..\..\..\common.props" />
<Import Project="..\..\..\configureawait.props" />

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
using Volo.Abp.SettingManagement.Blazor.AntDesignUI.Settings;
using Lsw.Abp.SettingManagement.Blazor.AntDesignUI.Settings;
using Volo.Abp.SettingManagement;
using Volo.Abp.SettingManagement.Blazor;
using Volo.Abp.UI.Navigation;

namespace Volo.Abp.SettingManagement.Blazor.AntDesignUI;
namespace Lsw.Abp.SettingManagement.Blazor.AntDesignUI;

[DependsOn(
typeof(AbpAutoMapperModule),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>
Loading

0 comments on commit a1f16f7

Please sign in to comment.