Browse Source

Merge branch 'dev' into net7

pull/14574/head
maliming 3 years ago
parent
commit
a0c22b56fa
No known key found for this signature in database GPG Key ID: 96224957E51C89E
  1. 10
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json
  2. 30
      docs/en/Themes/Index.md
  3. 4
      docs/en/docs-nav.json
  4. BIN
      docs/en/images/leptonxlite-theme-application-layout.jpeg
  5. 19
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/AngularThemeConfigurationArgs.cs
  6. 7
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs
  7. 33
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs
  8. 30
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/AngularThemeConfigurer.cs
  9. 6
      modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo.Abp.OpenIddict.AspNetCore.csproj
  10. 2
      modules/openiddict/src/Volo.Abp.OpenIddict.Domain.Shared/Volo.Abp.OpenIddict.Domain.Shared.csproj
  11. 2
      modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo.Abp.OpenIddict.Domain.csproj

10
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json

@ -796,6 +796,14 @@
"LeptonThemeForAdmin": "Lepton Theme for your admin dashboard by",
"LeptonThemeForAdminDescription": "Lepton Theme is still available and will be maintained. If you want to switch to LeptonX Theme as a Lepton Theme user, you can see the documentation to learn how-to.",
"LeptonCompatibleWith": "Lepton Theme is compatible with",
"BlackFridayDiscount": "Black Friday Discount"
"BlackFridayDiscount": "Black Friday Discount",
"UpgradePaymentInfoSection_DeveloperPrice": "{0} for {1} additional developer(s)",
"Upgrade": "Upgrade",
"Renewal": "Renewal",
"UpgradePaymentInfoSection_LicensePrice": "{0} license",
"UpgradePaymentInfoSection_LicenseRenewalPrice": "License renewal",
"Total": "Total",
"SupportPolicyFaqTitle": "What is your support policy?",
"SupportPolicyFaqExplanation": "We do support only the active and the previous major version. We do not guarantee a patch release for the 3rd and older major versions. For example, if the active version is 7.0.0, we will release patch releases for both 6.x.x and 7.x.x. Besides, we provide support only for ABP Framework and ABP Commercial related issues. That means no support is given for the 3rd party applications, cloud services and other peripheral libraries used by ABP products. We will use commercially reasonable efforts to provide our customers with technical support during \"Volosoft Bilisim A.S\"s official business hours. On the other hand, we do not commit to a service-level agreement (SLA) response time, but we will try to respond to the technical issues as quickly as possible within our official working hours. Unless a special agreement is made with the customer, we only provide support at https://support.abp.io. We also have private email support, which is only available to Enterprise License holders."
}
}

30
docs/en/Themes/Index.md

@ -0,0 +1,30 @@
# The Official Themes
ABP Framework provides a complete UI theming system. While you can build your own themes, you can use the following pre-built themes freely in your applications.
## The Basic Theme
The Basic Theme is a minimalist theme that doesn't add any styling on top of the plain [Bootstrap](https://getbootstrap.com/) styles. You can take the Basic Theme as the base theme and build your own theme or styling on top of it. Here, a screenshot from the theme:
![basic-theme-application-layout](../images/basic-theme-application-layout.png)
### Documentation
- [Basic Theme - MVC UI](../UI/AspNetCore/Basic-Theme.md)
- [Basic Theme - Blazor UI](../UI/Blazor/Basic-Theme.md)
- [Basic Theme - Angular UI](../UI/Angular/Basic-Theme.md)
## The LeptonX Lite Theme
**LeptonX Lite** is the free version of the [LeptonX Theme](https://x.leptontheme.com/), which is a part of the ABP Commercial. Here, a screenshot from the theme:
![LeptonX Lite application layout](../images/leptonxlite-theme-application-layout.jpeg)
### Documentation
- [LeptonX Lite - MVC UI](LeptonXLite/AspNetCore.md)
- [LeptonX Lite - Blazor UI](LeptonXLite/Blazor.md)
- [LeptonX Lite - Angular UI](LeptonXLite/Angular.md)
## See Also
* [Theming - MVC UI](../UI/AspNetCore/Theming.md)
* [Theming - Blazor UI](../UI/Blazor/Theming.md)
* [Theming - Angular UI](../UI/Angular/Theming.md)

4
docs/en/docs-nav.json

@ -1198,6 +1198,10 @@
{
"text": "Common",
"items": [
{
"text": "Themes",
"path": "Themes/Index.md"
},
{
"text": "Overriding the User Interface",
"path": "Customizing-Application-Modules-Overriding-User-Interface.md"

BIN
docs/en/images/leptonxlite-theme-application-layout.jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

19
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/AngularThemeConfigurationArgs.cs

@ -0,0 +1,19 @@
using Volo.Abp.Cli.ProjectBuilding.Building;
namespace Volo.Abp.Cli.Args;
public class AngularThemeConfigurationArgs
{
public Theme Theme { get; }
public string ProjectName { get; }
public string AngularFolderPath { get; }
public AngularThemeConfigurationArgs(Theme theme, string projectName, string angularFolderPath)
{
Theme = theme;
ProjectName = projectName;
AngularFolderPath = angularFolderPath;
}
}

7
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs

@ -40,7 +40,8 @@ public class NewCommand : ProjectCreationCommandBase, IConsoleCommand, ITransien
ILocalEventBus eventBus,
IBundlingService bundlingService,
ITemplateInfoProvider templateInfoProvider,
TemplateProjectBuilder templateProjectBuilder) :
TemplateProjectBuilder templateProjectBuilder,
AngularThemeConfigurer angularThemeConfigurer) :
base(connectionStringProvider,
solutionPackageVersionFinder,
cmdHelper,
@ -50,7 +51,8 @@ public class NewCommand : ProjectCreationCommandBase, IConsoleCommand, ITransien
initialMigrationCreator,
themePackageAdder,
eventBus,
bundlingService)
bundlingService,
angularThemeConfigurer)
{
TemplateInfoProvider = templateInfoProvider;
TemplateProjectBuilder = templateProjectBuilder;
@ -95,6 +97,7 @@ public class NewCommand : ProjectCreationCommandBase, IConsoleCommand, ITransien
Logger.LogInformation($"'{projectName}' has been successfully created to '{projectArgs.OutputFolder}'");
ConfigureAngularJsonForThemeSelection(projectArgs);
ConfigureNpmPackagesForTheme(projectArgs);
await RunGraphBuildForMicroserviceServiceTemplate(projectArgs);
await CreateInitialMigrationsAsync(projectArgs);

33
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs

@ -19,6 +19,7 @@ using Volo.Abp.Cli.ProjectBuilding.Events;
using Volo.Abp.Cli.ProjectBuilding.Templates.App;
using Volo.Abp.Cli.ProjectBuilding.Templates.Microservice;
using Volo.Abp.Cli.ProjectBuilding.Templates.Module;
using Volo.Abp.Cli.ProjectBuilding.Templates.MvcModule;
using Volo.Abp.Cli.Utils;
using Volo.Abp.EventBus.Local;
@ -38,6 +39,8 @@ public abstract class ProjectCreationCommandBase
public ILogger<NewCommand> Logger { get; set; }
public ThemePackageAdder ThemePackageAdder { get; }
public AngularThemeConfigurer AngularThemeConfigurer { get; }
public ProjectCreationCommandBase(
ConnectionStringProvider connectionStringProvider,
@ -49,7 +52,8 @@ public abstract class ProjectCreationCommandBase
InitialMigrationCreator initialMigrationCreator,
ThemePackageAdder themePackageAdder,
ILocalEventBus eventBus,
IBundlingService bundlingService)
IBundlingService bundlingService,
AngularThemeConfigurer angularThemeConfigurer)
{
_bundlingService = bundlingService;
ConnectionStringProvider = connectionStringProvider;
@ -61,6 +65,7 @@ public abstract class ProjectCreationCommandBase
InitialMigrationCreator = initialMigrationCreator;
EventBus = eventBus;
ThemePackageAdder = themePackageAdder;
AngularThemeConfigurer = angularThemeConfigurer;
Logger = NullLogger<NewCommand>.Instance;
}
@ -667,6 +672,32 @@ public abstract class ProjectCreationCommandBase
}
}
protected void ConfigureAngularJsonForThemeSelection(ProjectBuildArgs projectArgs)
{
var theme = projectArgs.Theme;
var isProTemplate = !projectArgs.TemplateName.IsNullOrEmpty() && projectArgs.TemplateName.EndsWith("-pro", StringComparison.OrdinalIgnoreCase);
var isDefaultTheme = (isProTemplate && theme == AppProTemplate.DefaultTheme) ||
(!isProTemplate && theme == AppTemplate.DefaultTheme);
if (isDefaultTheme || projectArgs.TemplateName == ModuleTemplate.TemplateName)
{
return;
}
if (theme.HasValue && projectArgs.UiFramework == UiFramework.Angular)
{
var angularFolderPath = projectArgs.TemplateName == MicroserviceProTemplate.TemplateName
? projectArgs.OutputFolder.EnsureEndsWith(Path.DirectorySeparatorChar) + "apps" + Path.DirectorySeparatorChar + "angular"
: projectArgs.OutputFolder.EnsureEndsWith(Path.DirectorySeparatorChar) + "angular";
AngularThemeConfigurer.Configure(new AngularThemeConfigurationArgs(
theme: theme.Value,
projectName: projectArgs.SolutionName.FullName,
angularFolderPath: angularFolderPath
));
}
}
public static class Options
{
public static class Template

30
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/AngularThemeConfigurer.cs

@ -0,0 +1,30 @@
using System;
using Volo.Abp.Cli.Args;
using Volo.Abp.Cli.Utils;
using Volo.Abp.DependencyInjection;
namespace Volo.Abp.Cli.ProjectModification;
public class AngularThemeConfigurer : ITransientDependency
{
private readonly ICmdHelper _cmdHelper;
public AngularThemeConfigurer(ICmdHelper cmdHelper)
{
_cmdHelper = cmdHelper;
}
public void Configure(AngularThemeConfigurationArgs args)
{
if (args.ProjectName.IsNullOrEmpty() || args.AngularFolderPath.IsNullOrEmpty())
{
return;
}
var command = "npx ng g @abp/ng.schematics:change-theme " +
$"--name {(int)args.Theme} " +
$"--target-project {args.ProjectName}";
_cmdHelper.RunCmd(command, workingDirectory: args.AngularFolderPath);
}
}

6
modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo.Abp.OpenIddict.AspNetCore.csproj

@ -20,8 +20,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="OpenIddict.Server.AspNetCore" Version="4.0.0-preview4.22517.68" />
<PackageReference Include="OpenIddict.Validation.AspNetCore" Version="4.0.0-preview4.22517.68" />
<PackageReference Include="OpenIddict.Validation.ServerIntegration" Version="4.0.0-preview4.22517.68" />
<PackageReference Include="OpenIddict.Server.AspNetCore" Version="4.0.0-preview5.22557.92" />
<PackageReference Include="OpenIddict.Validation.AspNetCore" Version="4.0.0-preview5.22557.92" />
<PackageReference Include="OpenIddict.Validation.ServerIntegration" Version="4.0.0-preview5.22557.92" />
</ItemGroup>
</Project>

2
modules/openiddict/src/Volo.Abp.OpenIddict.Domain.Shared/Volo.Abp.OpenIddict.Domain.Shared.csproj

@ -14,7 +14,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="OpenIddict.Abstractions" Version="4.0.0-preview4.22517.68" />
<PackageReference Include="OpenIddict.Abstractions" Version="4.0.0-preview5.22557.92" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="$(MicrosoftPackageVersion)" />
</ItemGroup>

2
modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo.Abp.OpenIddict.Domain.csproj

@ -17,7 +17,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="OpenIddict.Core" Version="4.0.0-preview4.22517.68" />
<PackageReference Include="OpenIddict.Core" Version="4.0.0-preview5.22557.92" />
</ItemGroup>
</Project>

Loading…
Cancel
Save