diff --git a/Directory.Packages.props b/Directory.Packages.props index e76cb94b80..96222e4a44 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -18,10 +18,10 @@ - - - - + + + + diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json index 3fc052783f..bfba94518d 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json @@ -697,6 +697,26 @@ "ModuleImageInfo2": "Max file size : 1 MB ", "ModuleImageInfo3": "Image Proportion : 1:1 ", "ModuleImageInfo4": " Download a sample cover image ", - "AreYouSureToDeleteImage": "Are you sure you want to delete this image?" + "AreYouSureToDeleteImage": "Are you sure you want to delete this image?", + "CompactPercentage": "Compact Percentage", + "CompactPercentageDescription": "Percentage of cache entries to remove during compaction (1-100)", + "Settings": "Settings", + "MaxSizeOfInMemoryCache": "Max Size Of In Memory Cache", + "MaxSizeOfInMemoryCacheInfo": "Gets or sets the maximum size of the memory cache.", + "SizeOfTriggerAutoCompact": "Size Of Trigger Auto Compact", + "SizeOfTriggerAutoCompactInfo": "Gets or sets the size threshold that triggers auto-compaction. When the cache size exceeds this value, auto-compaction will be performed", + "AutoCompactPercentage": "Auto Compact Percentage", + "AutoCompactPercentageInfo": "Gets or sets the percentage of items to remove when auto-compaction is triggered (1-100)", + "ClearCaches": "This clears all NuGet content cache", + "CacheLatestVersions": "Cache Latest Versions", + "VersionCount": "Version Count", + "VersionCountInfo": "Gets or sets the number of versions to cache", + "IncludeLeptonX": "Include LeptonX", + "IncludeLeptonXInfo": "Gets or sets whether to include LeptonX in the cache", + "IncludePrerelease": "Include Prerelease", + "IncludePrereleaseInfo": "Gets or sets whether to include prerelease versions in the cache", + "CacheVersionCount": "Cache Version Count", + "CacheVersionCountInfo": "Gets or sets the number of versions to cache", + "CacheLatestVersionsInfo": "This caches the latest versions of the NuGet packages" } } diff --git a/docs/en/framework/api-development/static-csharp-clients.md b/docs/en/framework/api-development/static-csharp-clients.md index c8eaea4231..b3cf80fcfc 100644 --- a/docs/en/framework/api-development/static-csharp-clients.md +++ b/docs/en/framework/api-development/static-csharp-clients.md @@ -47,7 +47,7 @@ Implement this class in your service application. You can use [auto API controll First, add [Volo.Abp.Http.Client](https://www.nuget.org/packages/Volo.Abp.Http.Client) nuget package to your client project: ```` -Install-Package Volo.Abp.Http.Client +dotnet add package Volo.Abp.Http.Client ```` Then add `AbpHttpClientModule` dependency to your module: diff --git a/docs/en/framework/api-development/swagger.md b/docs/en/framework/api-development/swagger.md index 1699e4d0d2..fb27bcf27b 100644 --- a/docs/en/framework/api-development/swagger.md +++ b/docs/en/framework/api-development/swagger.md @@ -29,7 +29,7 @@ If you want to manually install; 1. Add the [Volo.Abp.Swashbuckle](https://www.nuget.org/packages/Volo.Abp.Swashbuckle) NuGet package to your `Web` or `HttpApi.Host` project: - `Install-Package Volo.Abp.Swashbuckle` + `dotnet add package Volo.Abp.Swashbuckle` 2. Add the `AbpSwashbuckleModule` to the dependency list of your module: diff --git a/docs/en/framework/data/entity-framework-core/postgresql.md b/docs/en/framework/data/entity-framework-core/postgresql.md index 8561e8bada..e25cc2c5fb 100644 --- a/docs/en/framework/data/entity-framework-core/postgresql.md +++ b/docs/en/framework/data/entity-framework-core/postgresql.md @@ -21,6 +21,15 @@ Find `UseSqlServer()` call in *YourProjectName*DbContextFactory.cs inside the `. > Depending on your solution structure, you may find more `UseSqlServer()` calls that needs to be changed. + +## EnableLegacyTimestampBehavior + +Please enable the `Npgsql.EnableLegacyTimestampBehavior` in `PreConfigureServices` method of your EF Core module and `DbContextFactory(IDesignTimeDbContextFactory)` class. + +`AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);` + +See https://www.npgsql.org/efcore/release-notes/6.0.html#opting-out-of-the-new-timestamp-mapping-logic + ## Change the Connection Strings PostgreSql connection strings are different than SQL Server connection strings. So, check all `appsettings.json` files in your solution and replace the connection strings inside them. See the [connectionstrings.com](https://www.connectionstrings.com/postgresql/) for details of PostgreSql connection string options. diff --git a/docs/en/framework/fundamentals/caching.md b/docs/en/framework/fundamentals/caching.md index bdef675f64..c1a720b394 100644 --- a/docs/en/framework/fundamentals/caching.md +++ b/docs/en/framework/fundamentals/caching.md @@ -270,7 +270,7 @@ Distributed cache service provides an interesting feature. Assume that you've up ### IDistributedCacheSerializer -`IDistributedCacheSerializer` service is used to serialize and deserialize the cache items. The default implementation is the `Utf8JsonDistributedCacheSerializer` class that uses `IJsonSerializer` service to convert objects to [JSON](../../json-serialization.md) and vice verse. Then it uses UTC8 encoding to convert the JSON string to a byte array which is accepted by the distributed cache. +`IDistributedCacheSerializer` service is used to serialize and deserialize the cache items. The default implementation is the `Utf8JsonDistributedCacheSerializer` class that uses `IJsonSerializer` service to convert objects to [JSON](../../json-serialization.md) and vice verse. Then it uses UTF8 encoding to convert the JSON string to a byte array which is accepted by the distributed cache. You can [replace](./dependency-injection.md) this service with your own implementation if you want to implement your own serialization logic. diff --git a/docs/en/framework/fundamentals/fluent-validation.md b/docs/en/framework/fundamentals/fluent-validation.md index d3af69bae9..207cddcbd3 100644 --- a/docs/en/framework/fundamentals/fluent-validation.md +++ b/docs/en/framework/fundamentals/fluent-validation.md @@ -21,7 +21,7 @@ If you want to manually install; 1. Add the [Volo.Abp.FluentValidation](https://www.nuget.org/packages/Volo.Abp.FluentValidation) NuGet package to your project: ```` - Install-Package Volo.Abp.FluentValidation + dotnet add package Volo.Abp.FluentValidation ```` 2. Add the `AbpFluentValidationModule` to the dependency list of your module: diff --git a/docs/en/framework/infrastructure/background-jobs/hangfire.md b/docs/en/framework/infrastructure/background-jobs/hangfire.md index 396c7498b5..ac0e2aa297 100644 --- a/docs/en/framework/infrastructure/background-jobs/hangfire.md +++ b/docs/en/framework/infrastructure/background-jobs/hangfire.md @@ -25,7 +25,7 @@ If you want to manually install; 1. Add the [Volo.Abp.BackgroundJobs.HangFire](https://www.nuget.org/packages/Volo.Abp.BackgroundJobs.HangFire) NuGet package to your project: ```` - Install-Package Volo.Abp.BackgroundJobs.HangFire + dotnet add package Volo.Abp.BackgroundJobs.HangFire ```` 2. Add the `AbpBackgroundJobsHangfireModule` to the dependency list of your module: diff --git a/docs/en/framework/infrastructure/background-jobs/quartz.md b/docs/en/framework/infrastructure/background-jobs/quartz.md index 93cf5d53bf..1b18fd36ae 100644 --- a/docs/en/framework/infrastructure/background-jobs/quartz.md +++ b/docs/en/framework/infrastructure/background-jobs/quartz.md @@ -25,7 +25,7 @@ If you want to manually install; 1. Add the [Volo.Abp.BackgroundJobs.Quartz](https://www.nuget.org/packages/Volo.Abp.BackgroundJobs.Quartz) NuGet package to your project: ```` - Install-Package Volo.Abp.BackgroundJobs.Quartz + dotnet add package Volo.Abp.BackgroundJobs.Quartz ```` 2. Add the `AbpBackgroundJobsQuartzModule` to the dependency list of your module: diff --git a/docs/en/framework/infrastructure/background-workers/hangfire.md b/docs/en/framework/infrastructure/background-workers/hangfire.md index 3ccbaf35bd..fd72f48b5b 100644 --- a/docs/en/framework/infrastructure/background-workers/hangfire.md +++ b/docs/en/framework/infrastructure/background-workers/hangfire.md @@ -23,7 +23,7 @@ If you want to manually install; 1. Add the [Volo.Abp.BackgroundWorkers.Hangfire](https://www.nuget.org/packages/Volo.Abp.BackgroundWorkers.Hangfire) NuGet package to your project: ```` - Install-Package Volo.Abp.BackgroundWorkers.Hangfire + dotnet add package Volo.Abp.BackgroundWorkers.Hangfire ```` 2. Add the `AbpBackgroundWorkersHangfireModule` to the dependency list of your module: diff --git a/docs/en/framework/infrastructure/background-workers/quartz.md b/docs/en/framework/infrastructure/background-workers/quartz.md index 663fe22a7f..909371adb0 100644 --- a/docs/en/framework/infrastructure/background-workers/quartz.md +++ b/docs/en/framework/infrastructure/background-workers/quartz.md @@ -21,7 +21,7 @@ If you want to manually install; 1. Add the [Volo.Abp.BackgroundWorkers.Quartz](https://www.nuget.org/packages/Volo.Abp.BackgroundWorkers.Quartz) NuGet package to your project: ```` - Install-Package Volo.Abp.BackgroundWorkers.Quartz + dotnet add package Volo.Abp.BackgroundWorkers.Quartz ```` 2. Add the `AbpBackgroundWorkersQuartzModule` to the dependency list of your module: diff --git a/docs/en/framework/infrastructure/current-user.md b/docs/en/framework/infrastructure/current-user.md index d9082633f5..aa1974ab92 100644 --- a/docs/en/framework/infrastructure/current-user.md +++ b/docs/en/framework/infrastructure/current-user.md @@ -138,7 +138,7 @@ public class MyAppService : ApplicationService { new Claim(AbpClaimTypes.UserId, Guid.NewGuid().ToString()), new Claim(AbpClaimTypes.UserName, "john"), - new Claim("MyCustomCliam", "42") + new Claim("Claim", "42") } ) ); diff --git a/docs/en/framework/infrastructure/image-manipulation.md b/docs/en/framework/infrastructure/image-manipulation.md index 7ab8dc562e..a1ee6e1584 100644 --- a/docs/en/framework/infrastructure/image-manipulation.md +++ b/docs/en/framework/infrastructure/image-manipulation.md @@ -22,7 +22,7 @@ If you want to manually install; 1. Add the [Volo.Abp.Imaging.Abstractions](https://www.nuget.org/packages/Volo.Abp.Imaging.Abstractions) NuGet package to your project: ``` -Install-Package Volo.Abp.Imaging.Abstractions +dotnet add package Volo.Abp.Imaging.Abstractions ``` 2. Add the `AbpImagingAbstractionsModule` to the dependency list of your module: @@ -240,7 +240,7 @@ If you want to manually install; 1. Add the [Volo.Abp.Imaging.MagickNet](https://www.nuget.org/packages/Volo.Abp.Imaging.MagickNet) NuGet package to your project: ``` -Install-Package Volo.Abp.Imaging.MagickNet +dotnet add package Volo.Abp.Imaging.MagickNet ``` 2. Add `AbpImagingMagickNetModule` to your [module](../architecture/modularity/basics.md)'s dependency list: @@ -284,7 +284,7 @@ If you want to manually install; 1. Add the [Volo.Abp.Imaging.ImageSharp](https://www.nuget.org/packages/Volo.Abp.Imaging.ImageSharp) NuGet package to your project: ``` -Install-Package Volo.Abp.Imaging.ImageSharp +dotnet add package Volo.Abp.Imaging.ImageSharp ``` 2. Add `AbpImagingImageSharpModule` to your [module](../architecture/modularity/basics.md)'s dependency list: @@ -350,7 +350,7 @@ If you want to manually install; 1. Add the [Volo.Abp.Imaging.AspNetCore](https://www.nuget.org/packages/Volo.Abp.Imaging.AspNetCore) NuGet package to your project: ``` -Install-Package Volo.Abp.Imaging.AspNetCore +dotnet add package Volo.Abp.Imaging.AspNetCore ``` 2. Add `AbpImagingAspNetCoreModule` to your [module](../architecture/modularity/basics.md)'s dependency list: diff --git a/docs/en/framework/infrastructure/sms-sending.md b/docs/en/framework/infrastructure/sms-sending.md index e6bc9135e5..ef2a86445f 100644 --- a/docs/en/framework/infrastructure/sms-sending.md +++ b/docs/en/framework/infrastructure/sms-sending.md @@ -26,7 +26,7 @@ If you want to manually install; 1. Add the [Volo.Abp.Sms](https://www.nuget.org/packages/Volo.Abp.Sms) NuGet package to your project: ``` -Install-Package Volo.Abp.Sms +dotnet add package Volo.Abp.Sms ``` 2. Add the `AbpSmsModule` to the dependency list of your module: diff --git a/docs/en/framework/infrastructure/string-encryption.md b/docs/en/framework/infrastructure/string-encryption.md index 5f37f1fa99..bb398425f6 100644 --- a/docs/en/framework/infrastructure/string-encryption.md +++ b/docs/en/framework/infrastructure/string-encryption.md @@ -22,7 +22,7 @@ If you want to manually install; 1. Add the [Volo.Abp.Security](https://www.nuget.org/packages/Volo.Abp.Security) NuGet package to your project: - `Install-Package Volo.Abp.Security` + `dotnet add package Volo.Abp.Security` 2. Add the `AbpSecurityModule` to the dependency list of your module: @@ -52,11 +52,11 @@ All encryption operations are included in `IStringEncryptionService`. You can in public string Encrypt(string value) { - // To enrcypt a value + // To encrypt a value return StringEncryptionService.Encrypt(value); } - public string Decrpyt(string value) + public string Decrypt(string value) { // To decrypt a value return StringEncryptionService.Decrypt(value); @@ -122,4 +122,4 @@ Configure(opts => - **Keysize:** This constant is used to determine the keysize of the encryption algorithm. - Default value: `256` \ No newline at end of file + Default value: `256` diff --git a/docs/en/framework/infrastructure/text-templating/razor.md b/docs/en/framework/infrastructure/text-templating/razor.md index 1d17d4337e..77db5467aa 100644 --- a/docs/en/framework/infrastructure/text-templating/razor.md +++ b/docs/en/framework/infrastructure/text-templating/razor.md @@ -25,7 +25,7 @@ If you want to manually install; 1. Add the [Volo.Abp.TextTemplating.Razor](https://www.nuget.org/packages/Volo.Abp.TextTemplating.Razor) NuGet package to your project: ```` -Install-Package Volo.Abp.TextTemplating.Razor +dotnet add package Volo.Abp.TextTemplating.Razor ```` 2. Add the `AbpTextTemplatingRazorModule` to the dependency list of your module: diff --git a/docs/en/framework/infrastructure/text-templating/scriban.md b/docs/en/framework/infrastructure/text-templating/scriban.md index bd54914411..99d160ce85 100644 --- a/docs/en/framework/infrastructure/text-templating/scriban.md +++ b/docs/en/framework/infrastructure/text-templating/scriban.md @@ -19,7 +19,7 @@ If you want to manually install; 1. Add the [Volo.Abp.TextTemplating.Scriban](https://www.nuget.org/packages/Volo.Abp.TextTemplating.Scriban) NuGet package to your project: ```` -Install-Package Volo.Abp.TextTemplating.Scriban +dotnet add package Volo.Abp.TextTemplating.Scriban ```` 2. Add the `AbpTextTemplatingScribanModule` to the dependency list of your module: diff --git a/docs/en/framework/real-time/signalr.md b/docs/en/framework/real-time/signalr.md index d6cbbfbada..2d2710c77d 100644 --- a/docs/en/framework/real-time/signalr.md +++ b/docs/en/framework/real-time/signalr.md @@ -27,7 +27,7 @@ If you want to manually install; 1. Add the [Volo.Abp.AspNetCore.SignalR](https://www.nuget.org/packages/Volo.Abp.AspNetCore.SignalR) NuGet package to your project: ``` - Install-Package Volo.Abp.AspNetCore.SignalR + dotnet add package Volo.Abp.AspNetCore.SignalR ``` Or use the Visual Studio NuGet package management UI to install it. diff --git a/docs/en/get-started/empty-aspnet-core-application.md b/docs/en/get-started/empty-aspnet-core-application.md index b0457db71b..95861719ce 100644 --- a/docs/en/get-started/empty-aspnet-core-application.md +++ b/docs/en/get-started/empty-aspnet-core-application.md @@ -104,7 +104,7 @@ Replacing ASP.NET Core's DI system by Autofac and integrating to ABP is pretty e 1. Install [Volo.Abp.Autofac](https://www.nuget.org/packages/Volo.Abp.Autofac) package ```` -Install-Package Volo.Abp.Autofac +dotnet add package Volo.Abp.Autofac ```` 2. Add the ``AbpAutofacModule`` Dependency diff --git a/docs/en/images/samples-cms-kit.png b/docs/en/images/samples-cms-kit.png new file mode 100644 index 0000000000..0c4e3e5877 Binary files /dev/null and b/docs/en/images/samples-cms-kit.png differ diff --git a/docs/en/images/samples-easycrm.png b/docs/en/images/samples-easycrm.png new file mode 100644 index 0000000000..72924ae3e7 Binary files /dev/null and b/docs/en/images/samples-easycrm.png differ diff --git a/docs/en/images/samples-eshoponabp.png b/docs/en/images/samples-eshoponabp.png new file mode 100644 index 0000000000..f8e22fff7d Binary files /dev/null and b/docs/en/images/samples-eshoponabp.png differ diff --git a/docs/en/images/samples-eventhub.png b/docs/en/images/samples-eventhub.png new file mode 100644 index 0000000000..548412d62c Binary files /dev/null and b/docs/en/images/samples-eventhub.png differ diff --git a/docs/en/modules/docs.md b/docs/en/modules/docs.md index 69de3362a6..b564980ba3 100644 --- a/docs/en/modules/docs.md +++ b/docs/en/modules/docs.md @@ -73,25 +73,25 @@ Or you can also manually install nuget package to each project: * Install [Volo.Docs.Domain](https://www.nuget.org/packages/Volo.Docs.Domain/) nuget package to `Acme.MyProject.Domain` project. ```bash - Install-Package Volo.Docs.Domain + dotnet add package Volo.Docs.Domain ``` * Install [Volo.Docs.EntityFrameworkCore](https://www.nuget.org/packages/Volo.Docs.EntityFrameworkCore/) nuget package to `Acme.MyProject.EntityFrameworkCore` project. ```bash - Install-Package Volo.Docs.EntityFrameworkCore + dotnet add package Volo.Docs.EntityFrameworkCore ``` * Install [Volo.Docs.Application](https://www.nuget.org/packages/Volo.Docs.Application/) nuget package to `Acme.MyProject.Application` project. ```bash - Install-Package Volo.Docs.Application + dotnet add package Volo.Docs.Application ``` * Install [Volo.Docs.Web](https://www.nuget.org/packages/Volo.Docs.Domain/) nuget package to `Acme.MyProject.Web` project. ```bash - Install-Package Volo.Docs.Web + dotnet add package Volo.Docs.Web ``` ##### 3.2.1- Adding Module Dependencies diff --git a/docs/en/modules/virtual-file-explorer.md b/docs/en/modules/virtual-file-explorer.md index 21bccfd999..3157198c30 100644 --- a/docs/en/modules/virtual-file-explorer.md +++ b/docs/en/modules/virtual-file-explorer.md @@ -24,7 +24,7 @@ Or you can also manually install nuget package to `Acme.MyProject.Web` project: * Install [Volo.Abp.VirtualFileExplorer.Web](https://www.nuget.org/packages/Volo.Abp.VirtualFileExplorer.Web/) nuget package to `Acme.MyProject.Web` project. - `Install-Package Volo.Abp.VirtualFileExplorer.Web` + `dotnet add package Volo.Abp.VirtualFileExplorer.Web` ##### 2.1- Adding Module Dependencies diff --git a/docs/en/samples/index.md b/docs/en/samples/index.md index 6aea3d3fa5..39512d0134 100644 --- a/docs/en/samples/index.md +++ b/docs/en/samples/index.md @@ -9,6 +9,8 @@ A reference application built with ABP. It implements the Domain Driven Design w * [Live demo](https://www.openeventhub.com/) * [Source code](https://github.com/abpframework/eventhub) +![samples-event-hub](../images/samples-eventhub.png) + ## eShopOnAbp > ⚠️ **Important Notice** @@ -18,6 +20,8 @@ Reference microservice solution built with ABP and .NET. * [Source code](https://github.com/abpframework/eShopOnAbp) +![eshoponabp](../images/samples-eshoponabp.png) + ## CMS Kit Demo A minimal example website built with the [CMS Kit module](../modules/cms-kit/index.md). @@ -25,6 +29,8 @@ A minimal example website built with the [CMS Kit module](../modules/cms-kit/ind * [Live demo](https://cms-kit-demo.abpdemo.com/) * [Source code](https://github.com/abpframework/cms-kit-demo) +![samples-cms-kit](../images/samples-cms-kit.png) + ## Easy CRM A middle-size CRM application built with ABP. @@ -32,6 +38,8 @@ A middle-size CRM application built with ABP. * [Live demo](http://easycrm.abp.io/) * [Click here](easy-crm.md) to see the details and download the source code. +![samples-easy-crm](../images/samples-easycrm.png) + ## Book Store A simple CRUD application to show basic principles of developing an application with ABP. The same sample was implemented with different technologies and different modules: diff --git a/docs/en/solution-templates/layered-web-application/deployment/azure-deployment/step3-deployment-github-action.md b/docs/en/solution-templates/layered-web-application/deployment/azure-deployment/step3-deployment-github-action.md index a9ec807c64..14f2a48d66 100644 --- a/docs/en/solution-templates/layered-web-application/deployment/azure-deployment/step3-deployment-github-action.md +++ b/docs/en/solution-templates/layered-web-application/deployment/azure-deployment/step3-deployment-github-action.md @@ -480,7 +480,7 @@ push: workflow_dispatch: jobs: -build: + build: runs-on: ubuntu-latest steps: diff --git a/docs/en/solution-templates/layered-web-application/deployment/deployment-iis.md b/docs/en/solution-templates/layered-web-application/deployment/deployment-iis.md index 3d33cbd7a1..0de00c8d35 100644 --- a/docs/en/solution-templates/layered-web-application/deployment/deployment-iis.md +++ b/docs/en/solution-templates/layered-web-application/deployment/deployment-iis.md @@ -283,6 +283,34 @@ See: - https://learn.microsoft.com/en-us/aspnet/web-api/overview/testing-and-debugging/troubleshooting-http-405-errors-after-publishing-web-api-applications#resolve-http-405-errors - https://learn.microsoft.com/en-us/troubleshoot/developer/webapps/iis/site-behavior-performance/http-error-405-website#resolution-for-cause-3 +## Publish the Application(s) as IIS sub-application + +If your MVC application is a sub-application, you need to set the `BaseUrl` property of `AbpThemingOptions` to the sub-application’s path. The `BaseUrl` is used to configure the `base` element in the `head` section of the layout page. + +```csharp +public void ConfigureServices(IServiceCollection services) +{ + Configure(options => + { + options.BaseUrl = "/myapp/"; + }); +} +``` + +```html + + + + ... + + + ... + + +``` + +For Blazor applications, you can to set the `base` tag in the `App.razor` file instead of configure `AbpThemingOptions`. + ## How to get stdout-log If your application is running on IIS and getting errors like `502.5, 500.3x`, you can enable stdout logs to see the error details. diff --git a/docs/en/ui-themes/lepton-x/blazor.md b/docs/en/ui-themes/lepton-x/blazor.md index 5e49752ebb..2287b5aeac 100644 --- a/docs/en/ui-themes/lepton-x/blazor.md +++ b/docs/en/ui-themes/lepton-x/blazor.md @@ -347,8 +347,43 @@ namespace LeptonX.DemoApp.Blazor.MyComponents > Don't forget to remove repeated attributes from the razor page! ---- +#### Customizing the Footer Section + +You can add a new `LeptonXFooter.razor` file and override the `Footer` component as follows: + +```cs +@using Volo.Abp.DependencyInjection +@using Volo.Abp.AspNetCore.Components.Web.LeptonXTheme.Components.ApplicationLayout.SideMenu + +@inherits Footer +@attribute [ExposeServices(typeof(Footer))] +@attribute [Dependency(ReplaceServices = true)] + +
+
+ + +
+
+``` + +If you are using **Top Menu Layout**, then you can change the namespace as follows: + +```diff +- @using Volo.Abp.AspNetCore.Components.Web.LeptonXTheme.Components.ApplicationLayout.SideMenu ++ @using Volo.Abp.AspNetCore.Components.Web.LeptonXTheme.Components.ApplicationLayout.TopMenu +``` +> You can use the same approach customize the other components always. ## Common Components diff --git a/docs/en/ui-themes/lepton-x/images/leptonx-mvc-customizing-footer.png b/docs/en/ui-themes/lepton-x/images/leptonx-mvc-customizing-footer.png new file mode 100644 index 0000000000..06721044b8 Binary files /dev/null and b/docs/en/ui-themes/lepton-x/images/leptonx-mvc-customizing-footer.png differ diff --git a/docs/en/ui-themes/lepton-x/mvc.md b/docs/en/ui-themes/lepton-x/mvc.md index ce12a0ea95..683306adfe 100644 --- a/docs/en/ui-themes/lepton-x/mvc.md +++ b/docs/en/ui-themes/lepton-x/mvc.md @@ -162,6 +162,22 @@ Layout options of the MVC Razor Pages UI can be manageable by using **LeptonXThe > - **_Sidebar.cshtml** > - **_Toolbar.cshtml** +#### Customizing the Footer Section + +Add the **_Footer.cshtml** file under the **Themes/LeptonX/Layouts/Application** folder to customize the footer: + +```html + +```` + +![Customizing Footer](images/leptonx-mvc-customizing-footer.png) + +> You can customize the **_Sidebar.cshtml** and **_Toolbar.cshtml** files as well. + ### Account Layout ![Account layout](images/leptonx-account-layout-new.png) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Theming/AbpThemingOptions.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Theming/AbpThemingOptions.cs index 1197ad6e53..bf999be982 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Theming/AbpThemingOptions.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo/Abp/AspNetCore/Mvc/UI/Theming/AbpThemingOptions.cs @@ -6,6 +6,12 @@ public class AbpThemingOptions public string? DefaultThemeName { get; set; } + /// + /// If set, the base element will be added to the head element of the page. + /// eg: + /// + public string? BaseUrl { get; set; } + public AbpThemingOptions() { Themes = new ThemeDictionary(); diff --git a/framework/src/Volo.Abp.Swashbuckle/wwwroot/swagger/ui/abp.js b/framework/src/Volo.Abp.Swashbuckle/wwwroot/swagger/ui/abp.js index 0e13317cbf..11cbe56803 100644 --- a/framework/src/Volo.Abp.Swashbuckle/wwwroot/swagger/ui/abp.js +++ b/framework/src/Volo.Abp.Swashbuckle/wwwroot/swagger/ui/abp.js @@ -4,7 +4,9 @@ var abp = abp || {}; /* Application paths *****************************************/ //Current application root path (including virtual directory if exists). - abp.appPath = abp.appPath || '/'; + var baseElement = document.querySelector('base'); + var baseHref = baseElement ? baseElement.getAttribute('href') : null; + abp.appPath = baseHref || abp.appPath || '/'; /* UTILS ***************************************************/ diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Account.cshtml b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Account.cshtml index 9a62892b5e..564bf1acd2 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Account.cshtml +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Account.cshtml @@ -18,6 +18,7 @@ @inject ICurrentTenant CurrentTenant @inject IStringLocalizer MultiTenancyStringLocalizer @inject ITenantResolveResultAccessor TenantResolveResultAccessor +@inject IOptions ThemingOptions @{ Layout = null; @@ -34,6 +35,10 @@ + @if (!ThemingOptions.Value.BaseUrl.IsNullOrWhiteSpace()) + { + + } @(ViewBag.Title == null ? BrandingProvider.AppName : ViewBag.Title) diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml index c694c68424..c56c563017 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml @@ -1,4 +1,6 @@ -@using Volo.Abp.AspNetCore.Mvc.UI.Components.LayoutHook +@using Microsoft.Extensions.Options +@using Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers +@using Volo.Abp.AspNetCore.Mvc.UI.Components.LayoutHook @using Volo.Abp.AspNetCore.Mvc.UI.Layout @using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Bundling @using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.ContentTitle @@ -12,6 +14,8 @@ @using Volo.Abp.Ui.LayoutHooks @inject IBrandingProvider BrandingProvider @inject IPageLayout PageLayout +@inject IOptions ThemingOptions + @{ Layout = null; var containerClass = ViewBag.FluidLayout == true ? "container-fluid" : "container"; //TODO: Better and type-safe options @@ -40,6 +44,10 @@ + @if (!ThemingOptions.Value.BaseUrl.IsNullOrWhiteSpace()) + { + + } @pageTitle diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Empty.cshtml b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Empty.cshtml index aaef7898c3..d88d1b7144 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Empty.cshtml +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Empty.cshtml @@ -1,4 +1,6 @@ -@using Volo.Abp.AspNetCore.Mvc.UI.Components.LayoutHook +@using Microsoft.Extensions.Options +@using Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers +@using Volo.Abp.AspNetCore.Mvc.UI.Components.LayoutHook @using Volo.Abp.AspNetCore.Mvc.UI.Layout @using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Bundling @using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Themes.Basic.Components.PageAlerts @@ -10,6 +12,8 @@ @using Volo.Abp.Ui.LayoutHooks @inject IBrandingProvider BrandingProvider @inject IPageLayout PageLayout +@inject IOptions ThemingOptions + @{ Layout = null; var containerClass = ViewBag.FluidLayout == true ? "container-fluid" : "container"; //TODO: Better and type-safe options @@ -38,6 +42,10 @@ + @if (!ThemingOptions.Value.BaseUrl.IsNullOrWhiteSpace()) + { + + } @pageTitle @if (ViewBag.Description != null) diff --git a/npm/packs/core/src/abp.js b/npm/packs/core/src/abp.js index 8d11ad1fec..3b0fe25095 100644 --- a/npm/packs/core/src/abp.js +++ b/npm/packs/core/src/abp.js @@ -4,7 +4,9 @@ var abp = abp || {}; /* Application paths *****************************************/ //Current application root path (including virtual directory if exists). - abp.appPath = abp.appPath || '/'; + var baseElement = document.querySelector('base'); + var baseHref = baseElement ? baseElement.getAttribute('href') : null; + abp.appPath = baseHref || abp.appPath || '/'; abp.pageLoadTime = new Date(); diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/MyCompanyName.MyProjectName.Blazor.Server.Mongo.csproj b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/MyCompanyName.MyProjectName.Blazor.Server.Mongo.csproj index 32cd17a78e..08c06f0ed7 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/MyCompanyName.MyProjectName.Blazor.Server.Mongo.csproj +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/MyCompanyName.MyProjectName.Blazor.Server.Mongo.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj index 7761bbde29..ca6ca52f05 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Client/MyCompanyName.MyProjectName.Blazor.WebAssembly.Client.csproj b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Client/MyCompanyName.MyProjectName.Blazor.WebAssembly.Client.csproj index 34eeb42de4..5f9478ea96 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Client/MyCompanyName.MyProjectName.Blazor.WebAssembly.Client.csproj +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.WebAssembly/Client/MyCompanyName.MyProjectName.Blazor.WebAssembly.Client.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Client/MyCompanyName.MyProjectName.Blazor.Client.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Client/MyCompanyName.MyProjectName.Blazor.Client.csproj index 72840b70b4..e768be8ab5 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Client/MyCompanyName.MyProjectName.Blazor.Client.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Client/MyCompanyName.MyProjectName.Blazor.Client.csproj @@ -12,8 +12,8 @@ - - + + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/MyCompanyName.MyProjectName.Blazor.Server.Tiered.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/MyCompanyName.MyProjectName.Blazor.Server.Tiered.csproj index a8ff20d2ec..236ec617c2 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/MyCompanyName.MyProjectName.Blazor.Server.Tiered.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/MyCompanyName.MyProjectName.Blazor.Server.Tiered.csproj @@ -14,8 +14,8 @@ - - + + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj index 20b58b045d..91c81d9e90 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj @@ -15,8 +15,8 @@ - - + + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Client/MyCompanyName.MyProjectName.Blazor.WebApp.Client.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Client/MyCompanyName.MyProjectName.Blazor.WebApp.Client.csproj index 9347651ff4..86e8f08f28 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Client/MyCompanyName.MyProjectName.Blazor.WebApp.Client.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Client/MyCompanyName.MyProjectName.Blazor.WebApp.Client.csproj @@ -13,8 +13,8 @@ - - + + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client.csproj index 8861471b0f..379c36e3cb 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client.csproj @@ -13,8 +13,8 @@ - - + + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.csproj index f0da067b27..a0d4ffdb4a 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.csproj @@ -16,8 +16,8 @@ - - + + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp/MyCompanyName.MyProjectName.Blazor.WebApp.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp/MyCompanyName.MyProjectName.Blazor.WebApp.csproj index 65d54aeb32..6a7ec893c9 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp/MyCompanyName.MyProjectName.Blazor.WebApp.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp/MyCompanyName.MyProjectName.Blazor.WebApp.csproj @@ -16,8 +16,8 @@ - - + + diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host.Client/MyCompanyName.MyProjectName.Blazor.Host.Client.csproj b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host.Client/MyCompanyName.MyProjectName.Blazor.Host.Client.csproj index 3fe2b0415b..7213d6b05e 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host.Client/MyCompanyName.MyProjectName.Blazor.Host.Client.csproj +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host.Client/MyCompanyName.MyProjectName.Blazor.Host.Client.csproj @@ -10,8 +10,8 @@ - - + + diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/MyCompanyName.MyProjectName.Blazor.Server.Host.csproj b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/MyCompanyName.MyProjectName.Blazor.Server.Host.csproj index d05d66c666..52f7472466 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/MyCompanyName.MyProjectName.Blazor.Server.Host.csproj +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/MyCompanyName.MyProjectName.Blazor.Server.Host.csproj @@ -13,8 +13,8 @@ - - + +