forked from abpframework/abp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
392 changed files
with
31,103 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
@ECHO off | ||
cls | ||
|
||
ECHO Deleting all BIN and OBJ folders... | ||
ECHO. | ||
|
||
FOR /d /r . %%d in (bin,obj) DO ( | ||
IF EXIST "%%d" ( | ||
ECHO %%d | FIND /I "\node_modules\" > Nul && ( | ||
ECHO.Skipping: %%d | ||
) || ( | ||
ECHO.Deleting: %%d | ||
rd /s/q "%%d" | ||
) | ||
) | ||
) | ||
|
||
ECHO. | ||
ECHO.BIN and OBJ folders have been successfully deleted. Press any key to exit. | ||
pause > nul |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...Core.Components.UI.BasicTheme.WebAssembly/AbpAspNetCoreComponentsWebAssemblyBasicTheme.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using Volo.Abp.AspNetCore.Components.UI.Theming.Routing; | ||
using Volo.Abp.AspNetCore.Components.UI.Theming.Toolbars; | ||
using Volo.Abp.AspNetCore.Components.UI.Theming.WebAssembly; | ||
using Volo.Abp.Modularity; | ||
|
||
namespace Volo.Abp.AspNetCore.Components.UI.BasicTheme.WebAssembly | ||
{ | ||
[DependsOn( | ||
typeof(AbpAspNetCoreComponentsWebAssemblyThemingModule) | ||
)] | ||
public class AbpAspNetCoreComponentsWebAssemblyBasicThemeModule : AbpModule | ||
{ | ||
public override void ConfigureServices(ServiceConfigurationContext context) | ||
{ | ||
Configure<AbpRouterOptions>(options => | ||
{ | ||
options.AdditionalAssemblies.Add(typeof(AbpAspNetCoreComponentsWebAssemblyBasicThemeModule).Assembly); | ||
}); | ||
|
||
Configure<AbpToolbarOptions>(options => | ||
{ | ||
options.Contributors.Add(new BasicThemeToolbarContributor()); | ||
}); | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
...c/Volo.Abp.AspNetCore.Components.UI.BasicTheme.WebAssembly/BasicThemeBundleContributor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Volo.Abp.Bundling; | ||
|
||
namespace Volo.Abp.AspNetCore.Components.UI.BasicTheme.WebAssembly | ||
{ | ||
public class BasicThemeBundleContributor : IBundleContributor | ||
{ | ||
public void AddScripts(BundleContext context) | ||
{ | ||
|
||
} | ||
|
||
public void AddStyles(BundleContext context) | ||
{ | ||
context.Add("_content/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/libs/abp/css/theme.css"); | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
.../Volo.Abp.AspNetCore.Components.UI.BasicTheme.WebAssembly/BasicThemeToolbarContributor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System.Threading.Tasks; | ||
using Volo.Abp.AspNetCore.Components.UI.BasicTheme.Themes.Basic; | ||
using Volo.Abp.AspNetCore.Components.UI.Theming.Toolbars; | ||
|
||
namespace Volo.Abp.AspNetCore.Components.UI.BasicTheme.WebAssembly | ||
{ | ||
public class BasicThemeToolbarContributor : IToolbarContributor | ||
{ | ||
public Task ConfigureToolbarAsync(IToolbarConfigurationContext context) | ||
{ | ||
if (context.Toolbar.Name == StandardToolbars.Main) | ||
{ | ||
context.Toolbar.Items.Add(new ToolbarItem(typeof(LanguageSwitch))); | ||
context.Toolbar.Items.Add(new ToolbarItem(typeof(LoginDisplay))); | ||
} | ||
|
||
return Task.CompletedTask; | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
framework/src/Volo.Abp.AspNetCore.Components.UI.BasicTheme.WebAssembly/FodyWeavers.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
30 changes: 30 additions & 0 deletions
30
framework/src/Volo.Abp.AspNetCore.Components.UI.BasicTheme.WebAssembly/FodyWeavers.xsd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | ||
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. --> | ||
<xs:element name="Weavers"> | ||
<xs:complexType> | ||
<xs:all> | ||
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1"> | ||
<xs:complexType> | ||
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" /> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:all> | ||
<xs:attribute name="VerifyAssembly" type="xs:boolean"> | ||
<xs:annotation> | ||
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
<xs:attribute name="VerifyIgnoreCodes" type="xs:string"> | ||
<xs:annotation> | ||
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
<xs:attribute name="GenerateXsd" type="xs:boolean"> | ||
<xs:annotation> | ||
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:schema> |
59 changes: 59 additions & 0 deletions
59
.../Volo.Abp.AspNetCore.Components.UI.BasicTheme.WebAssembly/Themes/Basic/LoginDisplay.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
@namespace Volo.Abp.AspNetCore.Components.UI.BasicTheme.Themes.Basic | ||
@using Microsoft.AspNetCore.Components.WebAssembly.Authentication | ||
@using Volo.Abp.Users | ||
@using Volo.Abp.MultiTenancy | ||
@inject ICurrentUser CurrentUser | ||
@inject ICurrentTenant CurrentTenant | ||
@inject IJSRuntime JsRuntime | ||
@inject NavigationManager Navigation | ||
@inject SignOutSessionStateManager SignOutManager | ||
<AuthorizeView> | ||
<Authorized> | ||
<Dropdown> | ||
<DropdownToggle Color="Color.None"> | ||
@if (CurrentTenant.Name != null) | ||
{ | ||
<span><i>@CurrentTenant.Name</i>\@CurrentUser.UserName</span> | ||
} | ||
else | ||
{ | ||
<span>@CurrentUser.UserName</span> | ||
} | ||
</DropdownToggle> | ||
<DropdownMenu> | ||
@if (Menu != null) | ||
{ | ||
@foreach (var menuItem in Menu.Items) | ||
{ | ||
<DropdownItem Clicked="@(() => NavigateToAsync(menuItem.Url, menuItem.Target))">@menuItem.DisplayName</DropdownItem> | ||
} | ||
} | ||
<DropdownDivider /> | ||
<DropdownItem Clicked="BeginSignOut">Logout</DropdownItem> | ||
</DropdownMenu> | ||
</Dropdown> | ||
</Authorized> | ||
<NotAuthorized> | ||
<a class="nav-link" href="authentication/login">Log in</a> | ||
</NotAuthorized> | ||
</AuthorizeView> | ||
@code{ | ||
|
||
private async Task NavigateToAsync(string uri, string target = null) | ||
{ | ||
if (target == "_blank") | ||
{ | ||
await JsRuntime.InvokeVoidAsync("open", uri, target); | ||
} | ||
else | ||
{ | ||
Navigation.NavigateTo(uri); | ||
} | ||
} | ||
|
||
private async Task BeginSignOut() | ||
{ | ||
await SignOutManager.SetSignOutState(); | ||
await NavigateToAsync("authentication/logout"); | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
...lo.Abp.AspNetCore.Components.UI.BasicTheme.WebAssembly/Themes/Basic/LoginDisplay.razor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNetCore.Components; | ||
using Microsoft.AspNetCore.Components.Routing; | ||
using Volo.Abp.UI.Navigation; | ||
|
||
namespace Volo.Abp.AspNetCore.Components.UI.BasicTheme.Themes.Basic | ||
{ | ||
public partial class LoginDisplay : IDisposable | ||
{ | ||
[Inject] | ||
protected IMenuManager MenuManager { get; set; } | ||
|
||
protected ApplicationMenu Menu { get; set; } | ||
|
||
protected override async Task OnInitializedAsync() | ||
{ | ||
Menu = await MenuManager.GetAsync(StandardMenus.User); | ||
|
||
Navigation.LocationChanged += OnLocationChanged; | ||
} | ||
|
||
protected virtual void OnLocationChanged(object sender, LocationChangedEventArgs e) | ||
{ | ||
StateHasChanged(); | ||
} | ||
|
||
public void Dispose() | ||
{ | ||
Navigation.LocationChanged -= OnLocationChanged; | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
.../src/Volo.Abp.AspNetCore.Components.UI.BasicTheme.WebAssembly/Themes/Basic/_Imports.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@using System.Net.Http | ||
@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 Blazorise | ||
@using Blazorise.DataGrid | ||
@using Volo.Abp.BlazoriseUI; | ||
@using Volo.Abp.BlazoriseUI.Components; |
28 changes: 28 additions & 0 deletions
28
...UI.BasicTheme.WebAssembly/Volo.Abp.AspNetCore.Components.UI.BasicTheme.WebAssembly.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Razor"> | ||
|
||
<Import Project="..\..\..\configureawait.props" /> | ||
<Import Project="..\..\..\common.props" /> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net5.0</TargetFramework> | ||
<AssemblyName>Volo.Abp.AspNetCore.Components.UI.BasicTheme.WebAssembly</AssemblyName> | ||
<PackageId>Volo.Abp.AspNetCore.Components.UI.BasicTheme.WebAssembly</PackageId> | ||
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> | ||
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute> | ||
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute> | ||
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute> | ||
<RootNamespace /> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Volo.Abp.AspNetCore.Components.UI.BasicTheme\Volo.Abp.AspNetCore.Components.UI.BasicTheme.csproj" /> | ||
<ProjectReference Include="..\Volo.Abp.AspNetCore.Components.UI.Theming.WebAssembly\Volo.Abp.AspNetCore.Components.UI.Theming.WebAssembly.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="$(MicrosoftPackageVersion)" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="$(MicrosoftPackageVersion)" /> | ||
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" /> | ||
</ItemGroup> | ||
|
||
</Project> |
3 changes: 3 additions & 0 deletions
3
framework/src/Volo.Abp.AspNetCore.Components.UI.BasicTheme/FodyWeavers.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
30 changes: 30 additions & 0 deletions
30
framework/src/Volo.Abp.AspNetCore.Components.UI.BasicTheme/FodyWeavers.xsd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | ||
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. --> | ||
<xs:element name="Weavers"> | ||
<xs:complexType> | ||
<xs:all> | ||
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1"> | ||
<xs:complexType> | ||
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" /> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:all> | ||
<xs:attribute name="VerifyAssembly" type="xs:boolean"> | ||
<xs:annotation> | ||
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
<xs:attribute name="VerifyIgnoreCodes" type="xs:string"> | ||
<xs:annotation> | ||
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
<xs:attribute name="GenerateXsd" type="xs:boolean"> | ||
<xs:annotation> | ||
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:schema> |
27 changes: 27 additions & 0 deletions
27
framework/src/Volo.Abp.AspNetCore.Components.UI.BasicTheme/Themes/Basic/App.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@using Volo.Abp.AspNetCore.Components.UI.Theming.Routing | ||
@using Microsoft.Extensions.Options | ||
@inject IOptions<AbpRouterOptions> RouterOptions | ||
<CascadingAuthenticationState> | ||
<Router AppAssembly="RouterOptions.Value.AppAssembly" | ||
AdditionalAssemblies="RouterOptions.Value.AdditionalAssemblies"> | ||
<Found Context="routeData"> | ||
<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)"> | ||
<NotAuthorized> | ||
@if (!context.User.Identity.IsAuthenticated) | ||
{ | ||
<RedirectToLogin /> | ||
} | ||
else | ||
{ | ||
<p>You are not authorized to access this resource.</p> | ||
} | ||
</NotAuthorized> | ||
</AuthorizeRouteView> | ||
</Found> | ||
<NotFound> | ||
<LayoutView Layout="@typeof(MainLayout)"> | ||
<p>Sorry, there's nothing at this address.</p> | ||
</LayoutView> | ||
</NotFound> | ||
</Router> | ||
</CascadingAuthenticationState> |
9 changes: 9 additions & 0 deletions
9
framework/src/Volo.Abp.AspNetCore.Components.UI.BasicTheme/Themes/Basic/Branding.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@using Volo.Abp.Ui.Branding | ||
@inject IBrandingProvider BrandingProvider | ||
<a class="navbar-brand" href=""> | ||
@if (!BrandingProvider.LogoUrl.IsNullOrWhiteSpace()) | ||
{ | ||
<img src="@BrandingProvider.LogoUrl" alt="@BrandingProvider.AppName" > | ||
} | ||
@BrandingProvider.AppName | ||
</a> |
Oops, something went wrong.