Skip to content

Commit

Permalink
Fix missing layout (#183)
Browse files Browse the repository at this point in the history
* fix: missing layout for not full tempalte

* fix condition

* Update AntDesign 0.19.3

* fix resources
  • Loading branch information
ElderJames authored Jun 29, 2024
1 parent 9b86055 commit 6aff196
Show file tree
Hide file tree
Showing 24 changed files with 132 additions and 24 deletions.
13 changes: 7 additions & 6 deletions .template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"exclude": [
"Components/**/*",
"Extensions/**/*",
"Layouts/**/*",
"Layouts/UserLayout.*",
"Models/**/*",
"Pages/**/*",
"Services/**/*",
Expand All @@ -116,13 +116,14 @@
{
"condition": "(host == 'webapp')",
"source": "./src/AntDesign.Pro",
"target": "./AntDesign.Pro.Template/AntDesign.Pro.Template.Client/",
"target": "./src/AntDesign.Pro.Template.Client/",
"modifiers": [
{
"exclude": [
"AntDesign.Pro.csproj",
"AntDesign.Pro.csproj.DotSettings",
"gulpfile.js"
"gulpfile.js",
"App.razor"
]
},
{
Expand All @@ -144,7 +145,7 @@
"exclude": [
"Components/**/*",
"Extensions/**/*",
"Layouts/**/*",
"Layouts/UserLayout.*",
"Models/**/*",
"Pages/**/*",
"Services/**/*",
Expand Down Expand Up @@ -232,12 +233,12 @@
{
"condition": "(host == 'webapp')",
"source": "./.template.config/templates/wasm",
"target": "./AntDesign.Pro.Template/AntDesign.Pro.Template.Client/",
"target": "./src/AntDesign.Pro.Template.Client/",
"modifiers": [
{
"exclude": [
"AntDesign.Pro.Template.csproj",
"Program.cs"
"Program.cs"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

<ItemGroup>
<PackageReference Include="AntDesign.Charts" Version="0.4.0" />
<PackageReference Include="AntDesign.Extensions.Localization" Version="0.19.2" />
<PackageReference Include="AntDesign.ProLayout" Version="0.19.2" />
<PackageReference Include="AntDesign.Extensions.Localization" Version="0.19.3" />
<PackageReference Include="AntDesign.ProLayout" Version="0.19.3" />
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions .template.config/templates/wasm/AntDesign.Pro.Template.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

<ItemGroup>
<PackageReference Include="AntDesign.Charts" Version="0.4.0" />
<PackageReference Include="AntDesign.Extensions.Localization" Version="0.19.2" />
<PackageReference Include="AntDesign.ProLayout" Version="0.19.2" />
<PackageReference Include="AntDesign.Extensions.Localization" Version="0.19.3" />
<PackageReference Include="AntDesign.ProLayout" Version="0.19.3" />
<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.Options.ConfigurationExtensions" Version="8.0.0" />
Expand Down
4 changes: 2 additions & 2 deletions .template.config/templates/webapp/AntDesign.Pro.Template.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.11.35005.142
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntDesign.Pro.Template", "AntDesign.Pro.Template\AntDesign.Pro.Template\AntDesign.Pro.Template.csproj", "{B5934F21-93C6-46BA-B25D-C2D3B62EDCFC}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntDesign.Pro.Template", "src\AntDesign.Pro.Template\AntDesign.Pro.Template.csproj", "{B5934F21-93C6-46BA-B25D-C2D3B62EDCFC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntDesign.Pro.Template.Client", "AntDesign.Pro.Template\AntDesign.Pro.Template.Client\AntDesign.Pro.Template.Client.csproj", "{21B555E8-4868-4C61-A487-269C436022FF}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntDesign.Pro.Template.Client", "src\AntDesign.Pro.Template.Client\AntDesign.Pro.Template.Client.csproj", "{21B555E8-4868-4C61-A487-269C436022FF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

<ItemGroup>
<PackageReference Include="AntDesign.Charts" Version="0.4.0" />
<PackageReference Include="AntDesign.Extensions.Localization" Version="0.19.2" />
<PackageReference Include="AntDesign.ProLayout" Version="0.19.2" />
<PackageReference Include="AntDesign.Extensions.Localization" Version="0.19.3" />
<PackageReference Include="AntDesign.ProLayout" Version="0.19.3" />
<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.Options.ConfigurationExtensions" Version="8.0.0" />
Expand Down
4 changes: 0 additions & 4 deletions src/AntDesign.Pro.WebApp/AntDesign.Pro.WebApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,4 @@
<ProjectReference Include="..\AntDesign.Pro\AntDesign.Pro.csproj" />
</ItemGroup>

<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>

</Project>
20 changes: 18 additions & 2 deletions src/AntDesign.Pro/AntDesign.Pro.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

<ItemGroup>
<PackageReference Include="AntDesign.Charts" Version="0.5.1" />
<PackageReference Include="AntDesign.Extensions.Localization" Version="0.19.2" />
<PackageReference Include="AntDesign.ProLayout" Version="0.19.2" />
<PackageReference Include="AntDesign.Extensions.Localization" Version="0.19.3" />
<PackageReference Include="AntDesign.ProLayout" Version="0.19.3" />
<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.Options.ConfigurationExtensions" Version="8.0.0" />
Expand Down Expand Up @@ -48,4 +48,20 @@
<Watch Include="**\*.less" />
</ItemGroup>

<ItemGroup>
<Compile Update="Resources\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="Resources\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<CustomToolNamespace>AntDesign.Pro.Template</CustomToolNamespace>
</EmbeddedResource>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public partial class RightContent
[Inject] protected IProjectService ProjectService { get; set; }
[Inject] protected MessageService MessageService { get; set; }

[Inject] private IStringLocalizer<App> L { get; set; }
[Inject] private IStringLocalizer<Resources> L { get; set; }
[Inject] private ILocalizationService LocalizationService { get; set; }

protected override async Task OnInitializedAsync()
Expand Down
6 changes: 4 additions & 2 deletions src/AntDesign.Pro/Layouts/BasicLayout.razor
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
@namespace AntDesign.Pro.Template

Check warning on line 1 in src/AntDesign.Pro/Layouts/BasicLayout.razor

View workflow job for this annotation

GitHub Actions / publish-and-deploy

Possible null reference assignment. [/home/runner/work/ant-design-pro-blazor/ant-design-pro-blazor/src/AntDesign.Pro/AntDesign.Pro.csproj]

Check warning on line 1 in src/AntDesign.Pro/Layouts/BasicLayout.razor

View workflow job for this annotation

GitHub Actions / publish-and-deploy

Non-nullable property 'TabService' must contain a non-null value when exiting constructor. Consider declaring the property as nullable. [/home/runner/work/ant-design-pro-blazor/ant-design-pro-blazor/src/AntDesign.Pro/AntDesign.Pro.csproj]

Check warning on line 1 in src/AntDesign.Pro/Layouts/BasicLayout.razor

View workflow job for this annotation

GitHub Actions / publish-and-deploy

Non-nullable property 'HttpClient' must contain a non-null value when exiting constructor. Consider declaring the property as nullable. [/home/runner/work/ant-design-pro-blazor/ant-design-pro-blazor/src/AntDesign.Pro/AntDesign.Pro.csproj]

Check warning on line 1 in src/AntDesign.Pro/Layouts/BasicLayout.razor

View workflow job for this annotation

GitHub Actions / publish-and-deploy

Non-nullable property 'LocalizationService' must contain a non-null value when exiting constructor. Consider declaring the property as nullable. [/home/runner/work/ant-design-pro-blazor/ant-design-pro-blazor/src/AntDesign.Pro/AntDesign.Pro.csproj]

Check warning on line 1 in src/AntDesign.Pro/Layouts/BasicLayout.razor

View workflow job for this annotation

GitHub Actions / publish-and-deploy

Non-nullable field '_localizationChanged' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. [/home/runner/work/ant-design-pro-blazor/ant-design-pro-blazor/src/AntDesign.Pro/AntDesign.Pro.csproj]

Check warning on line 1 in src/AntDesign.Pro/Layouts/BasicLayout.razor

View workflow job for this annotation

GitHub Actions / Build and Deploy Job

Possible null reference assignment. [/home/runner/work/ant-design-pro-blazor/ant-design-pro-blazor/src/AntDesign.Pro/AntDesign.Pro.csproj]

Check warning on line 1 in src/AntDesign.Pro/Layouts/BasicLayout.razor

View workflow job for this annotation

GitHub Actions / Build and Deploy Job

Non-nullable property 'TabService' must contain a non-null value when exiting constructor. Consider declaring the property as nullable. [/home/runner/work/ant-design-pro-blazor/ant-design-pro-blazor/src/AntDesign.Pro/AntDesign.Pro.csproj]

Check warning on line 1 in src/AntDesign.Pro/Layouts/BasicLayout.razor

View workflow job for this annotation

GitHub Actions / Build and Deploy Job

Non-nullable property 'HttpClient' must contain a non-null value when exiting constructor. Consider declaring the property as nullable. [/home/runner/work/ant-design-pro-blazor/ant-design-pro-blazor/src/AntDesign.Pro/AntDesign.Pro.csproj]

Check warning on line 1 in src/AntDesign.Pro/Layouts/BasicLayout.razor

View workflow job for this annotation

GitHub Actions / Build and Deploy Job

Non-nullable property 'LocalizationService' must contain a non-null value when exiting constructor. Consider declaring the property as nullable. [/home/runner/work/ant-design-pro-blazor/ant-design-pro-blazor/src/AntDesign.Pro/AntDesign.Pro.csproj]

Check warning on line 1 in src/AntDesign.Pro/Layouts/BasicLayout.razor

View workflow job for this annotation

GitHub Actions / Build and Deploy Job

Non-nullable field '_localizationChanged' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. [/home/runner/work/ant-design-pro-blazor/ant-design-pro-blazor/src/AntDesign.Pro/AntDesign.Pro.csproj]

Check warning on line 1 in src/AntDesign.Pro/Layouts/BasicLayout.razor

View workflow job for this annotation

GitHub Actions / release-and-publish-package

Possible null reference assignment. [/home/runner/work/ant-design-pro-blazor/ant-design-pro-blazor/src/AntDesign.Pro/AntDesign.Pro.csproj]

Check warning on line 1 in src/AntDesign.Pro/Layouts/BasicLayout.razor

View workflow job for this annotation

GitHub Actions / release-and-publish-package

Non-nullable property 'TabService' must contain a non-null value when exiting constructor. Consider declaring the property as nullable. [/home/runner/work/ant-design-pro-blazor/ant-design-pro-blazor/src/AntDesign.Pro/AntDesign.Pro.csproj]

Check warning on line 1 in src/AntDesign.Pro/Layouts/BasicLayout.razor

View workflow job for this annotation

GitHub Actions / release-and-publish-package

Non-nullable property 'HttpClient' must contain a non-null value when exiting constructor. Consider declaring the property as nullable. [/home/runner/work/ant-design-pro-blazor/ant-design-pro-blazor/src/AntDesign.Pro/AntDesign.Pro.csproj]

Check warning on line 1 in src/AntDesign.Pro/Layouts/BasicLayout.razor

View workflow job for this annotation

GitHub Actions / release-and-publish-package

Non-nullable property 'LocalizationService' must contain a non-null value when exiting constructor. Consider declaring the property as nullable. [/home/runner/work/ant-design-pro-blazor/ant-design-pro-blazor/src/AntDesign.Pro/AntDesign.Pro.csproj]

Check warning on line 1 in src/AntDesign.Pro/Layouts/BasicLayout.razor

View workflow job for this annotation

GitHub Actions / release-and-publish-package

Non-nullable field '_localizationChanged' must contain a non-null value when exiting constructor. Consider declaring the field as nullable. [/home/runner/work/ant-design-pro-blazor/ant-design-pro-blazor/src/AntDesign.Pro/AntDesign.Pro.csproj]
@inherits LayoutComponentBase
@* //#if (full)*@
@implements IDisposable
@*#//#endif*@

<AntDesign.ProLayout.BasicLayout
Logo="@("https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg")"
Expand All @@ -18,9 +20,9 @@
</Space>
</HeaderContentRender>
<RightContentRender>
//#if (full)
@*//#if (full)*@
<AntDesign.Pro.Template.Components.RightContent />
//#endif
@*//#endif*@
</RightContentRender>
<ChildContent>
<ReuseTabs></ReuseTabs>
Expand Down
5 changes: 4 additions & 1 deletion src/AntDesign.Pro/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
using System.Net.Http;
using System.Threading.Tasks;
using AntDesign.ProLayout;
//#if (full)
using AntDesign.Pro.Template.Services;
//#endif
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.DependencyInjection;

Expand All @@ -28,7 +30,7 @@ public static async Task Main(string[] args)
public static void AddClientServices(IServiceCollection services)
{
services.AddAntDesign();

//#if (full)
services.AddInteractiveStringLocalizer();
services.AddLocalization(options => options.ResourcesPath = "Resources");

Expand All @@ -37,6 +39,7 @@ public static void AddClientServices(IServiceCollection services)
services.AddScoped<IUserService, UserService>();
services.AddScoped<IAccountService, AccountService>();
services.AddScoped<IProfileService, ProfileService>();
//#endif
}
}
}
90 changes: 90 additions & 0 deletions src/AntDesign.Pro/Resources/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.

0 comments on commit 6aff196

Please sign in to comment.