39 changed files with 456 additions and 50 deletions
@ -0,0 +1,3 @@ |
|||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
|||
<ConfigureAwait /> |
|||
</Weavers> |
|||
@ -0,0 +1,16 @@ |
|||
@using Microsoft.Extensions.Options |
|||
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Routing |
|||
@inject IOptions<AbpRouterOptions> RouterOptions |
|||
|
|||
<Router AppAssembly="RouterOptions.Value.AppAssembly" |
|||
AdditionalAssemblies="RouterOptions.Value.AdditionalAssemblies"> |
|||
<Found Context="routeData"> |
|||
<RouteView RouteData="@routeData" DefaultLayout="@typeof(DefaultLayout)"/> |
|||
</Found> |
|||
<NotFound> |
|||
<LayoutView Layout="@typeof(DefaultLayout)"> |
|||
<p>Sorry, there's nothing at this address.</p> |
|||
</LayoutView> |
|||
</NotFound> |
|||
</Router> |
|||
<AntContainer/> |
|||
@ -0,0 +1,10 @@ |
|||
@using Volo.Abp.Ui.Branding |
|||
@inject IBrandingProvider BrandingProvider |
|||
|
|||
<a class="ant-design-brand" href=""> |
|||
@if (!BrandingProvider.LogoUrl.IsNullOrWhiteSpace()) |
|||
{ |
|||
<img src="@BrandingProvider.LogoUrl.TrimStart('/','~')" alt="@BrandingProvider.AppName"/> |
|||
} |
|||
@BrandingProvider.AppName |
|||
</a> |
|||
@ -0,0 +1,49 @@ |
|||
@inherits LayoutComponentBase |
|||
@using Microsoft.Extensions.Options |
|||
@inject IOptions<AbpAntDesignThemeOptions> Options |
|||
|
|||
@if (Options.Value.Menu.Place == MenuOptions.MenuPlace.Top) |
|||
{ |
|||
<Layout Class="ant-design-layout"> |
|||
<Header Class="ant-design-header"> |
|||
<Branding/> |
|||
<MainMenu/> |
|||
</Header> |
|||
<Content Class="ant-design-content"> |
|||
<PageAlert/> |
|||
@Body |
|||
<UiPageProgress/> |
|||
</Content> |
|||
<Footer Class="ant-design-footer">Footer</Footer> |
|||
</Layout> |
|||
} |
|||
else |
|||
{ |
|||
<Layout Class="ant-design-layout"> |
|||
<Sider |
|||
Class="ant-design-side" |
|||
Collapsible |
|||
Collapsed=Collapsed> |
|||
<Branding/> |
|||
<MainMenu/> |
|||
</Sider> |
|||
<Layout Class="ant-design-layout"> |
|||
<Header Class="ant-design-header"> |
|||
@if (Collapsed) |
|||
{ |
|||
<Icon Type="menu-unfold" Theme="outline" Class="trigger" OnClick="OnCollapse" /> |
|||
} |
|||
else |
|||
{ |
|||
<Icon Type="menu-fold" Theme="outline" Class="trigger" OnClick="OnCollapse" /> |
|||
} |
|||
</Header> |
|||
<Content Class="ant-design-content"> |
|||
<PageAlert/> |
|||
@Body |
|||
<UiPageProgress/> |
|||
</Content> |
|||
<Footer Class="ant-design-footer"></Footer> |
|||
</Layout> |
|||
</Layout> |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
namespace Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Themes.AntDesignTheme; |
|||
|
|||
public partial class DefaultLayout |
|||
{ |
|||
protected bool Collapsed { get; set; } |
|||
|
|||
protected void OnCollapse() |
|||
{ |
|||
Collapsed = !Collapsed; |
|||
} |
|||
} |
|||
@ -0,0 +1,23 @@ |
|||
using AntDesign; |
|||
using Microsoft.AspNetCore.Components; |
|||
using Volo.Abp.UI.Navigation; |
|||
|
|||
namespace Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Themes.AntDesignTheme; |
|||
|
|||
public partial class MainMenuItem : ComponentBase |
|||
{ |
|||
[Parameter] |
|||
public ApplicationMenuItem Menu { get; set; } |
|||
|
|||
private RenderFragment GetSubMenuTemplate() |
|||
{ |
|||
return null; |
|||
// return @<span>
|
|||
// @if (Menu.Icon != null)
|
|||
// {
|
|||
// <Icon Type="@Menu.Icon" Theme="outline"></Icon>
|
|||
// }
|
|||
// <span>@Menu.Name</span>
|
|||
// </span>;
|
|||
} |
|||
} |
|||
@ -0,0 +1,14 @@ |
|||
html, |
|||
body, |
|||
#root, |
|||
#app, |
|||
#ApplicationContainer, |
|||
app { |
|||
height: 100%; |
|||
} |
|||
.colorWeak { |
|||
filter: invert(80%); |
|||
} |
|||
.ant-layout { |
|||
min-height: 100vh; |
|||
} |
|||
@ -0,0 +1,3 @@ |
|||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
|||
<ConfigureAwait /> |
|||
</Weavers> |
|||
@ -1,17 +1,20 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk.Razor"> |
|||
|
|||
<Import Project="..\..\..\configureawait.props" /> |
|||
<Import Project="..\..\configureawait.props"/> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>net6.0</TargetFramework> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme\Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.csproj" /> |
|||
<ProjectReference Include="..\Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme\Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.csproj"/> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Volo.Abp.AspNetCore.Components.WebAssembly" Version="5.1.3" /> |
|||
<PackageReference Include="Volo.Abp.AspNetCore.Components.WebAssembly" Version="5.1.3"/> |
|||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.1"/> |
|||
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="6.0.1"/> |
|||
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0"/> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
|
|||
@ -1,12 +1,23 @@ |
|||
@if (_percent is >= 0 and <= 100) |
|||
{ |
|||
if (_progressStatus == ProgressStatus.Active) |
|||
{ |
|||
<div Class="uiPageProgress"> |
|||
if (_progressStatus == ProgressStatus.Active) |
|||
{ |
|||
<Progress StrokeColor="_gradients" Percent=_percent.Value></Progress> |
|||
} |
|||
else |
|||
{ |
|||
} |
|||
else |
|||
{ |
|||
<Progress Percent=_percent.Value></Progress> |
|||
} |
|||
|
|||
} |
|||
</div> |
|||
} |
|||
|
|||
<style> |
|||
.uiPageProgress{ |
|||
top: 0 !important; |
|||
left: 0 !important; |
|||
width: 100% !important; |
|||
z-index: 9999 !important; |
|||
position: fixed !important; |
|||
} |
|||
</style> |
|||
|
|||
@ -0,0 +1,19 @@ |
|||
<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.3" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\..\modules\Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme\Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme.csproj" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,44 @@ |
|||
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; |
|||
|
|||
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; |
|||
}); |
|||
|
|||
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>(); |
|||
|
|||
|
|||
} |
|||
} |
|||
@ -0,0 +1,29 @@ |
|||
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(), |
|||
Features = new ApplicationFeatureConfigurationDto(), |
|||
Localization = new ApplicationLocalizationConfigurationDto(), |
|||
MultiTenancy = new MultiTenancyInfoDto(), |
|||
ObjectExtensions = new ObjectExtensionsDto(), |
|||
Timing = new TimingDto() |
|||
}; |
|||
return Task.FromResult(result); |
|||
} |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
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))); |
|||
} |
|||
} |
|||
@ -0,0 +1,5 @@ |
|||
@page "/" |
|||
|
|||
<AbpPageHeader Title="Index" BreadcrumbItems="@BreadcrumbItems"/> |
|||
|
|||
<p>hello world</p> |
|||
@ -0,0 +1,17 @@ |
|||
using Lsw.Abp.AntDesignUI; |
|||
using Microsoft.AspNetCore.Components; |
|||
|
|||
namespace AntDesignUIApp.Pages; |
|||
|
|||
public partial class Index : ComponentBase |
|||
{ |
|||
public List<BreadcrumbItem> BreadcrumbItems { get; set; } = new(); |
|||
|
|||
protected override void OnInitialized() |
|||
{ |
|||
BreadcrumbItems = new List<BreadcrumbItem>() |
|||
{ |
|||
new("Index") |
|||
}; |
|||
} |
|||
} |
|||
@ -0,0 +1,16 @@ |
|||
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(); |
|||
@ -0,0 +1,30 @@ |
|||
{ |
|||
"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" |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
@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 Lsw.Abp.AntDesignUI |
|||
@using Lsw.Abp.AntDesignUI.Components |
|||
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Layout; |
|||
@ -0,0 +1,3 @@ |
|||
{ |
|||
|
|||
} |
|||
|
After Width: | Height: | Size: 5.3 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 2.6 KiB |
@ -0,0 +1,27 @@ |
|||
<!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=637816878164034163" 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=637816878165418374"></script> |
|||
<!--/ABP:Scripts--> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,27 @@ |
|||
[ |
|||
{ |
|||
"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" |
|||
} |
|||
] |
|||
Loading…
Reference in new issue