diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Web/Menus/OrdersMenuContributor.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Web/Menus/OrdersMenuContributor.cs
index f1660326..a31277c7 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Web/Menus/OrdersMenuContributor.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Web/Menus/OrdersMenuContributor.cs
@@ -38,7 +38,7 @@ namespace EasyAbp.EShop.Orders.Web.Menus
if (!orderManagementMenuItem.Items.IsNullOrEmpty())
{
var eShopMenuItem = context.Menu.Items.GetOrAdd(i => i.Name == OrdersMenus.ModuleGroupPrefix,
- () => new ApplicationMenuItem(OrdersMenus.ModuleGroupPrefix, l["Menu:EasyAbpEShop"]));
+ () => new ApplicationMenuItem(OrdersMenus.ModuleGroupPrefix, l["Menu:EasyAbpEShop"], icon: "fa fa-shopping-bag"));
eShopMenuItem.Items.Add(orderManagementMenuItem);
}
diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Web/Menus/PaymentsMenuContributor.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Web/Menus/PaymentsMenuContributor.cs
index 604c97e0..0896b069 100644
--- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Web/Menus/PaymentsMenuContributor.cs
+++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Web/Menus/PaymentsMenuContributor.cs
@@ -44,7 +44,7 @@ namespace EasyAbp.EShop.Payments.Web.Menus
if (!paymentManagementMenuItem.Items.IsNullOrEmpty())
{
var eShopMenuItem = context.Menu.Items.GetOrAdd(i => i.Name == PaymentsMenus.ModuleGroupPrefix,
- () => new ApplicationMenuItem(PaymentsMenus.ModuleGroupPrefix, l["Menu:EasyAbpEShop"]));
+ () => new ApplicationMenuItem(PaymentsMenus.ModuleGroupPrefix, l["Menu:EasyAbpEShop"], icon: "fa fa-shopping-bag"));
eShopMenuItem.Items.Add(paymentManagementMenuItem);
}
diff --git a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Menus/ProductsMenuContributor.cs b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Menus/ProductsMenuContributor.cs
index a202f774..591364de 100644
--- a/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Menus/ProductsMenuContributor.cs
+++ b/modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Menus/ProductsMenuContributor.cs
@@ -41,7 +41,7 @@ namespace EasyAbp.EShop.Products.Web.Menus
if (!productManagementMenuItem.Items.IsNullOrEmpty())
{
var eShopMenuItem = context.Menu.Items.GetOrAdd(i => i.Name == ProductsMenus.ModuleGroupPrefix,
- () => new ApplicationMenuItem(ProductsMenus.ModuleGroupPrefix, l["Menu:EasyAbpEShop"]));
+ () => new ApplicationMenuItem(ProductsMenus.ModuleGroupPrefix, l["Menu:EasyAbpEShop"], icon: "fa fa-shopping-bag"));
eShopMenuItem.Items.Add(productManagementMenuItem);
}
diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Web/Menus/StoresMenuContributor.cs b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Web/Menus/StoresMenuContributor.cs
index d320bae3..4d4b4b92 100644
--- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Web/Menus/StoresMenuContributor.cs
+++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Web/Menus/StoresMenuContributor.cs
@@ -51,7 +51,7 @@ namespace EasyAbp.EShop.Stores.Web.Menus
if (!storeManagementMenuItem.Items.IsNullOrEmpty())
{
var eShopMenuItem = context.Menu.Items.GetOrAdd(i => i.Name == StoresMenus.ModuleGroupPrefix,
- () => new ApplicationMenuItem(StoresMenus.ModuleGroupPrefix, l["Menu:EasyAbpEShop"]));
+ () => new ApplicationMenuItem(StoresMenus.ModuleGroupPrefix, l["Menu:EasyAbpEShop"], icon: "fa fa-shopping-bag"));
eShopMenuItem.Items.Add(storeManagementMenuItem);
}
diff --git a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Menus/BasketsMenuContributor.cs b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Menus/BasketsMenuContributor.cs
index 9badbcb4..ad964b3e 100644
--- a/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Menus/BasketsMenuContributor.cs
+++ b/plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/Menus/BasketsMenuContributor.cs
@@ -28,7 +28,7 @@ namespace EasyAbp.EShop.Plugins.Baskets.Web.Menus
if (!basketManagementMenuItem.Items.IsNullOrEmpty())
{
var eShopMenuItem = context.Menu.Items.GetOrAdd(i => i.Name == BasketsMenus.ModuleGroupPrefix,
- () => new ApplicationMenuItem(BasketsMenus.ModuleGroupPrefix, l["Menu:EasyAbpEShop"]));
+ () => new ApplicationMenuItem(BasketsMenus.ModuleGroupPrefix, l["Menu:EasyAbpEShop"], icon: "fa fa-shopping-bag"));
eShopMenuItem.Items.Add(basketManagementMenuItem);
}
diff --git a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Web/Menus/CouponsMenuContributor.cs b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Web/Menus/CouponsMenuContributor.cs
index bd324755..b80d3aea 100644
--- a/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Web/Menus/CouponsMenuContributor.cs
+++ b/plugins/Coupons/src/EasyAbp.EShop.Plugins.Coupons.Web/Menus/CouponsMenuContributor.cs
@@ -39,7 +39,7 @@ namespace EasyAbp.EShop.Plugins.Coupons.Web.Menus
if (!couponManagementMenuItem.Items.IsNullOrEmpty())
{
var eShopMenuItem = context.Menu.Items.GetOrAdd(i => i.Name == CouponsMenus.ModuleGroupPrefix,
- () => new ApplicationMenuItem(CouponsMenus.ModuleGroupPrefix, l["Menu:EasyAbpEShop"]));
+ () => new ApplicationMenuItem(CouponsMenus.ModuleGroupPrefix, l["Menu:EasyAbpEShop"], icon: "fa fa-shopping-bag"));
eShopMenuItem.Items.Add(couponManagementMenuItem);
}
diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj b/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj
index 2d95a425..c602502d 100644
--- a/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj
+++ b/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj
@@ -47,7 +47,7 @@
-
+
diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSampleWebModule.cs b/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSampleWebModule.cs
index 673cafee..a0c5e671 100644
--- a/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSampleWebModule.cs
+++ b/samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSampleWebModule.cs
@@ -30,13 +30,14 @@ using EShopSample.Localization;
using EShopSample.MultiTenancy;
using EShopSample.Web.Menus;
using Microsoft.OpenApi.Models;
-using NUglify.JavaScript.Syntax;
using Volo.Abp;
using Volo.Abp.Account.Web;
using Volo.Abp.AspNetCore.Authentication.JwtBearer;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.Localization;
-using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic;
+using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
+using Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite;
+using Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
using Volo.Abp.AspNetCore.Serilog;
using Volo.Abp.Autofac;
@@ -61,7 +62,7 @@ namespace EShopSample.Web
typeof(AbpAutofacModule),
typeof(AbpIdentityWebModule),
typeof(AbpAccountWebIdentityServerModule),
- typeof(AbpAspNetCoreMvcUiBasicThemeModule),
+ typeof(AbpAspNetCoreMvcUiLeptonXLiteThemeModule),
typeof(AbpAspNetCoreAuthenticationJwtBearerModule),
typeof(AbpTenantManagementWebModule),
typeof(AbpFeatureManagementWebModule),
@@ -98,6 +99,7 @@ namespace EShopSample.Web
var configuration = context.Services.GetConfiguration();
ConfigureUrls(configuration);
+ ConfigureBundles();
ConfigureAuthentication(context, configuration);
ConfigureAutoMapper();
ConfigureVirtualFileSystem(hostingEnvironment);
@@ -105,22 +107,16 @@ namespace EShopSample.Web
ConfigureNavigationServices();
ConfigureAutoApiControllers();
ConfigureSwaggerServices(context.Services);
- ConfigureConventionalControllers();
}
- private void ConfigureConventionalControllers()
+ private void ConfigureBundles()
{
- Configure(options =>
- {
- options.ConventionalControllers.Create(typeof(EShopSampleApplicationModule).Assembly);
- });
- }
-
- private void ConfigureUrls(IConfiguration configuration)
- {
- Configure(options =>
+ Configure(options =>
{
- options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"];
+ options.StyleBundles.Configure(
+ LeptonXLiteThemeBundles.Styles.Global,
+ bundle => { bundle.AddFiles("/global-styles.css"); }
+ );
});
}
@@ -130,11 +126,19 @@ namespace EShopSample.Web
.AddJwtBearer(options =>
{
options.Authority = configuration["AuthServer:Authority"];
- options.RequireHttpsMetadata = false;
+ options.RequireHttpsMetadata = Convert.ToBoolean(configuration["AuthServer:RequireHttpsMetadata"]);
options.Audience = "EShopSample";
});
}
+ private void ConfigureUrls(IConfiguration configuration)
+ {
+ Configure(options =>
+ {
+ options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"];
+ });
+ }
+
private void ConfigureAutoMapper()
{
Configure(options =>
@@ -272,7 +276,6 @@ namespace EShopSample.Web
app.UseStaticFiles();
app.UseRouting();
app.UseAuthentication();
- app.UseJwtTokenMiddleware();
if (MultiTenancyConsts.IsEnabled)
{
diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Web/wwwroot/global-styles.css b/samples/EShopSample/aspnet-core/src/EShopSample.Web/wwwroot/global-styles.css
new file mode 100644
index 00000000..056b01e3
--- /dev/null
+++ b/samples/EShopSample/aspnet-core/src/EShopSample.Web/wwwroot/global-styles.css
@@ -0,0 +1 @@
+/* Your Global Styles */
\ No newline at end of file
diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Web/wwwroot/libs/abp/jquery/abp.jquery.js b/samples/EShopSample/aspnet-core/src/EShopSample.Web/wwwroot/libs/abp/jquery/abp.jquery.js
index 81ebf1e2..76dfd389 100644
--- a/samples/EShopSample/aspnet-core/src/EShopSample.Web/wwwroot/libs/abp/jquery/abp.jquery.js
+++ b/samples/EShopSample/aspnet-core/src/EShopSample.Web/wwwroot/libs/abp/jquery/abp.jquery.js
@@ -205,14 +205,16 @@ var abp = abp || {};
handleAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
var messagePromise = null;
+ var responseJSON = jqXHR.responseJSON ? jqXHR.responseJSON : JSON.parse(jqXHR.responseText);
+
if (userOptions.abpHandleError !== false) {
- messagePromise = abp.ajax.showError(jqXHR.responseJSON.error);
+ messagePromise = abp.ajax.showError(responseJSON.error);
}
- abp.ajax.logError(jqXHR.responseJSON.error);
+ abp.ajax.logError(responseJSON.error);
- $dfd && $dfd.reject(jqXHR.responseJSON.error, jqXHR);
- userOptions.error && userOptions.error(jqXHR.responseJSON.error, jqXHR);
+ $dfd && $dfd.reject(responseJSON.error, jqXHR);
+ userOptions.error && userOptions.error(responseJSON.error, jqXHR);
if (jqXHR.status === 401 && userOptions.abpHandleError !== false) {
abp.ajax.handleUnAuthorizedRequest(messagePromise);
diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Web/wwwroot/libs/bootstrap/js/bootstrap.enable.popovers.everywhere.js b/samples/EShopSample/aspnet-core/src/EShopSample.Web/wwwroot/libs/bootstrap/js/bootstrap.enable.popovers.everywhere.js
new file mode 100644
index 00000000..a02a2a7a
--- /dev/null
+++ b/samples/EShopSample/aspnet-core/src/EShopSample.Web/wwwroot/libs/bootstrap/js/bootstrap.enable.popovers.everywhere.js
@@ -0,0 +1,5 @@
+(function () {
+ [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]')).map(function (popoverTriggerEl) {
+ return new bootstrap.Popover(popoverTriggerEl)
+ })
+})();