diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json index 3af0308564..4f017817dd 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json +++ b/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." } } diff --git a/docs/en/Themes/Index.md b/docs/en/Themes/Index.md new file mode 100644 index 0000000000..a588e37d3a --- /dev/null +++ b/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) \ No newline at end of file diff --git a/docs/en/docs-nav.json b/docs/en/docs-nav.json index ed9cb37135..ef6b0cad07 100644 --- a/docs/en/docs-nav.json +++ b/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" diff --git a/docs/en/images/leptonxlite-theme-application-layout.jpeg b/docs/en/images/leptonxlite-theme-application-layout.jpeg new file mode 100644 index 0000000000..12e15ddcb7 Binary files /dev/null and b/docs/en/images/leptonxlite-theme-application-layout.jpeg differ diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/AngularThemeConfigurationArgs.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Args/AngularThemeConfigurationArgs.cs new file mode 100644 index 0000000000..3422697dba --- /dev/null +++ b/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; + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs index d104c313ed..8421eb656b 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs +++ b/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); diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs index eae01cf503..0ab182bac1 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs +++ b/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 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.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 diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/AngularThemeConfigurer.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/AngularThemeConfigurer.cs new file mode 100644 index 0000000000..4df9e31d47 --- /dev/null +++ b/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); + } +} \ No newline at end of file diff --git a/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo.Abp.OpenIddict.AspNetCore.csproj b/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo.Abp.OpenIddict.AspNetCore.csproj index 2145f0b08b..ea725aa21f 100644 --- a/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo.Abp.OpenIddict.AspNetCore.csproj +++ b/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Volo.Abp.OpenIddict.AspNetCore.csproj @@ -20,8 +20,8 @@ - - - + + + diff --git a/modules/openiddict/src/Volo.Abp.OpenIddict.Domain.Shared/Volo.Abp.OpenIddict.Domain.Shared.csproj b/modules/openiddict/src/Volo.Abp.OpenIddict.Domain.Shared/Volo.Abp.OpenIddict.Domain.Shared.csproj index cc6d461740..040d7a986f 100644 --- a/modules/openiddict/src/Volo.Abp.OpenIddict.Domain.Shared/Volo.Abp.OpenIddict.Domain.Shared.csproj +++ b/modules/openiddict/src/Volo.Abp.OpenIddict.Domain.Shared/Volo.Abp.OpenIddict.Domain.Shared.csproj @@ -14,7 +14,7 @@ - + diff --git a/modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo.Abp.OpenIddict.Domain.csproj b/modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo.Abp.OpenIddict.Domain.csproj index d9edb84fcc..3da97bf272 100644 --- a/modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo.Abp.OpenIddict.Domain.csproj +++ b/modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo.Abp.OpenIddict.Domain.csproj @@ -17,7 +17,7 @@ - +