Skip to content

Commit

Permalink
Update AntDesign 1.1.2 and .NET 9 (#204)
Browse files Browse the repository at this point in the history
* Update AntDesign 1.1.2 and .NET 9

* update action

* fix build

* fix build
  • Loading branch information
ElderJames authored Jan 9, 2025
1 parent 2e89a99 commit ae46c98
Show file tree
Hide file tree
Showing 42 changed files with 154 additions and 152 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ jobs:
with:
persist-credentials: false

- uses: actions/setup-dotnet@v1
- name: Setup .NET SDKs
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.100
dotnet-version: |
9.0.x
- uses: actions/setup-node@v1
with:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ jobs:
with:
persist-credentials: false

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
- name: Setup .NET SDKs
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.100
dotnet-version: |
9.0.x
- uses: actions/setup-node@v1
with:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ jobs:
steps:
- uses: actions/checkout@v1

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
- name: Setup .NET SDKs
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.100
dotnet-version: |
9.0.x
- uses: actions/setup-node@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .template.config/templates/assets/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "AntDesign.Pro.Template",
"version": "1.0.0",
"version": "1.1.2",
"description": "An out-of-box UI solution for enterprise applications as a Blazor boilerplate.",
"scripts": {
"start": "dotnet watch -p ./ run",
Expand Down
10 changes: 5 additions & 5 deletions .template.config/templates/server/AntDesign.Pro.Template.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AntDesign.Charts" Version="0.4.0" />
<PackageReference Include="AntDesign.Extensions.Localization" Version="1.0.0" />
<PackageReference Include="AntDesign.ProLayout" Version="1.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
<PackageReference Include="AntDesign.Extensions.Localization" Version="1.1.2" />
<PackageReference Include="AntDesign.ProLayout" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.0" />
<PackageReference Include="System.Net.Http.Json" Version="9.0.0" />
</ItemGroup>

<!--#if (UseNodeJS) -->
Expand Down
2 changes: 1 addition & 1 deletion .template.config/templates/server/Pages/Welcome.razor
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Card>
<Alert
Message="AntDesign.Templates have been published to nuget, you can download and use them directly."
Type="success"
Type="@AlertType.Success"
ShowIcon="true"
Banner
Style="margin: -12px; margin-bottom: 24px"/>
Expand Down
16 changes: 8 additions & 8 deletions .template.config/templates/wasm/AntDesign.Pro.Template.csproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<RazorLangVersion>3.0</RazorLangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AntDesign.Charts" Version="0.4.0" />
<PackageReference Include="AntDesign.Extensions.Localization" Version="1.0.0" />
<PackageReference Include="AntDesign.ProLayout" Version="1.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
<PackageReference Include="AntDesign.Extensions.Localization" Version="1.1.2" />
<PackageReference Include="AntDesign.ProLayout" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="9.0.0" />
<PackageReference Include="System.Net.Http.Json" Version="9.0.0" />
</ItemGroup>

<!--#if (UseNodeJS) -->
Expand Down
2 changes: 1 addition & 1 deletion .template.config/templates/wasm/Pages/Welcome.razor
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Card>
<Alert
Message="AntDesign.Templates have been published to nuget, you can download and use them directly."
Type="success"
Type="@AlertType.Success"
ShowIcon="true"
Banner
Style="margin: -12px; margin-bottom: 24px"/>
Expand Down
2 changes: 1 addition & 1 deletion .template.config/templates/webapp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "AntDesign.Pro.Template",
"version": "1.0.0",
"version": "1.1.2",
"description": "An out-of-box UI solution for enterprise applications as a Blazor boilerplate.",
"scripts": {
"start": "dotnet watch -p ./src/AntDesign.Pro.Template run",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>
Expand All @@ -10,13 +10,13 @@

<ItemGroup>
<PackageReference Include="AntDesign.Charts" Version="0.4.0" />
<PackageReference Include="AntDesign.Extensions.Localization" Version="1.0.0" />
<PackageReference Include="AntDesign.ProLayout" Version="1.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
<PackageReference Include="AntDesign.Extensions.Localization" Version="1.1.2" />
<PackageReference Include="AntDesign.ProLayout" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="9.0.0" />
<PackageReference Include="System.Net.Http.Json" Version="9.0.0" />
</ItemGroup>

<!--#if (UseNodeJS) -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\AntDesign.Pro.Template.Client\AntDesign.Pro.Template.Client.csproj" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="9.0.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "AntDesign.Pro",
"version": "1.0.0",
"version": "1.1.2",
"description": "An out-of-box UI solution for enterprise applications as a Blazor boilerplate.",
"scripts": {
"start": "dotnet watch -p ./src/AntDesign.Pro run",
Expand Down
16 changes: 8 additions & 8 deletions src/AntDesign.Pro/AntDesign.Pro.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net8</TargetFramework>
<TargetFramework>net9</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AssemblyName>AntDesign.Pro.Template</AssemblyName>
Expand All @@ -12,13 +12,13 @@

<ItemGroup>
<PackageReference Include="AntDesign.Charts" Version="0.5.1" />
<PackageReference Include="AntDesign.Extensions.Localization" Version="1.0.0" />
<PackageReference Include="AntDesign.ProLayout" Version="1.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
<PackageReference Include="AntDesign.Extensions.Localization" Version="1.1.2" />
<PackageReference Include="AntDesign.ProLayout" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="9.0.0" />
<PackageReference Include="System.Net.Http.Json" Version="9.0.0" />
</ItemGroup>

<PropertyGroup Condition=" '$(SolutionDir)'==''">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<AntDesign.Tooltip Title="@("Help")" Placement="@Placement.Bottom">
<Unbound>
<span @ref="@context.Current" class="action">
<Icon Type="question-circle" Theme="outline" />
<Icon Type="question-circle" Theme="IconThemeType.Outline" />
</span>
</Unbound>
</AntDesign.Tooltip>
Expand Down
2 changes: 1 addition & 1 deletion src/AntDesign.Pro/Layouts/BasicLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<Icon Class="action" Type="@(collapsed?"menu-unfold":"menu-fold")" OnClick="Toggle" />
</SpaceItem>
<SpaceItem>
<Icon Class="action" Type="reload" Theme="outline" OnClick="Reload" />
<Icon Class="action" Type="reload" Theme="@IconThemeType.Outline" OnClick="Reload" />
</SpaceItem>
</Space>
</HeaderContentRender>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Actions="Actions">
<CardMeta>
<AvatarTemplate>
<Avatar Size="small" Src="@context.Avatar" />
<Avatar Size="@AvatarSize.Small" Src="@context.Avatar" />
</AvatarTemplate>
<TitleTemplate>@context.Title</TitleTemplate>
</CardMeta>
Expand All @@ -35,15 +35,15 @@
{

private static readonly RenderFragment Download =@<AntDesign.Tooltip Title="@("下载")">
<Icon Type="download" Theme="outline" />
<Icon Type="download" Theme="@IconThemeType.Outline" />
</AntDesign.Tooltip>;

private static readonly IList<RenderFragment> Actions = new List<RenderFragment>
{
Download,
@<AntDesign.Tooltip Title="@("Edit")"><Icon Type="edit" Theme="outline" /></AntDesign.Tooltip>,
@<AntDesign.Tooltip Title="@("Share")"><Icon Type="share-alt" Theme="outline" /></AntDesign.Tooltip>,
@<Dropdown><Icon Type="ellipsis" Theme="outline" /></Dropdown>
@<AntDesign.Tooltip Title="@("Edit")"><Icon Type="edit" Theme="@IconThemeType.Outline" /></AntDesign.Tooltip>,
@<AntDesign.Tooltip Title="@("Share")"><Icon Type="share-alt" Theme="@IconThemeType.Outline" /></AntDesign.Tooltip>,
@<Dropdown><Icon Type="ellipsis" Theme="@IconThemeType.Outline" /></Dropdown>
};

private static RenderFragment FormatWan(int val) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="listContent">
<div class="description">@Data.Content</div>
<div class="extra">
<Avatar Src="@Data.Avatar" Size="small" />
<Avatar Src="@Data.Avatar" Size="@AvatarSize.Small" />
<a href="@Data.Href">@Data.Owner</a> Posted on <a href="@Data.Href">@Data.Href</a>
<em>@Data.UpdatedAt.ToString("yyyy-MM-dd HH:mm:ss")</em>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<AntList
TItem="ListItemDataType"
Size="large"
Size="ListSize.Large"
Class="articleList"
DataSource="List">
<ListItem NoFlex>
Expand Down
66 changes: 32 additions & 34 deletions src/AntDesign.Pro/Pages/Account/Center/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@

<div class="detail">
<p>
<Icon Type="contacts" Theme="outline" Style="margin-right:8px;" />
<Icon Type="contacts" Theme="@IconThemeType.Outline" Style="margin-right:8px;" />
@_currentUser.Title
</p>
<p>
<Icon Type="cluster" Theme="outline" Style="margin-right:8px;" />
<Icon Type="cluster" Theme="@IconThemeType.Outline" Style="margin-right:8px;" />
@_currentUser.Group
</p>
<p>
<Icon Type="home" Theme="outline" Style="margin-right:8px;" />
<Icon Type="home" Theme="@IconThemeType.Outline" Style="margin-right:8px;" />
<!--todo: add userinfo-->
@_currentUser.Geographic.Province.Label
@_currentUser.Geographic.City.Label
Expand All @@ -32,20 +32,20 @@

<div class="tags">
<div class="tagsTitle">Tags</div>
@foreach (var tag in _currentUser.Tags) {
@foreach (var tag in _currentUser.Tags)
{
<Tag>@tag.Label</Tag>
}

@if (_inputVisible) {
<AntDesign.Input Type="text"
Size="small"
Style="width: 78px"
@bind-Value="InputValue"
OnBlur="HandleInputConfirm" />
@if (_inputVisible)
{
<AntDesign.Input Type="InputType.Text" Size="InputSize.Small" Style="width: 78px"
@bind-Value="InputValue" OnBlur="HandleInputConfirm" />
}
else {
else
{
<Tag OnClick="ShowInput" Style="border-style: dashed">
<Icon Type="plus" Theme="outline" />
<Icon Type="plus" Theme="@IconThemeType.Outline" />
</Tag>
}
</div>
Expand All @@ -60,28 +60,26 @@
</AntDesign.Col>
<AntDesign.Col Lg="17" Md="24">
<Card Class="tabsCard">
<CardTabs>
<Tabs DefaultActiveKey="1">
<TabPane Key="1">
<TabTemplate>Articles (@_fakeList.Count)</TabTemplate>
<ChildContent>
<Articles List="_fakeList" />
</ChildContent>
</TabPane>
<TabPane Key="2">
<TabTemplate>Applications (@_fakeList.Count)</TabTemplate>
<ChildContent>
<Applications List="_fakeList" />
</ChildContent>
</TabPane>
<TabPane Key="3">
<TabTemplate>Projects (@_fakeList.Count)</TabTemplate>
<ChildContent>
<Projects List="_fakeList" />
</ChildContent>
</TabPane>
</Tabs>
</CardTabs>
<Tabs DefaultActiveKey="1">
<TabPane Key="1">
<TabTemplate>Articles (@_fakeList.Count)</TabTemplate>
<ChildContent>
<Articles List="_fakeList" />
</ChildContent>
</TabPane>
<TabPane Key="2">
<TabTemplate>Applications (@_fakeList.Count)</TabTemplate>
<ChildContent>
<Applications List="_fakeList" />
</ChildContent>
</TabPane>
<TabPane Key="3">
<TabTemplate>Projects (@_fakeList.Count)</TabTemplate>
<ChildContent>
<Projects List="_fakeList" />
</ChildContent>
</TabPane>
</Tabs>
</Card>
</AntDesign.Col>
</Row>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="baseView">
<div class="left" style="min-width: 310px;">
<Form
Layout="vertical"
Layout="@FormLayout.Vertical"
OnFinish="HandleFinish"
Model="@_currentUser">
<FormItem Label="Email">
Expand Down Expand Up @@ -36,7 +36,7 @@
<PhoneView />
</FormItem>
<FormItem>
<Button HtmlType="submit" Type="primary">
<Button HtmlType="submit" Type="@ButtonType.Primary">
Update Information
</Button>
</FormItem>
Expand Down
Loading

0 comments on commit ae46c98

Please sign in to comment.