From 17ddd5b7a4548afa163cd9283dcbefb689629efc Mon Sep 17 00:00:00 2001 From: gdlcf88 Date: Thu, 8 Feb 2024 20:08:31 +0800 Subject: [PATCH] Move the widget to the `SettingUi` directory --- src/EasyAbp.Abp.SettingUi.Web/AbpSettingUiWebModule.cs | 3 ++- .../Pages/Components/{ => SettingUi}/Default.cshtml | 2 +- .../Pages/Components/{ => SettingUi}/Default.css | 0 .../Components/{ => SettingUi}/Partials/_Checkbox.cshtml | 0 .../Components/{ => SettingUi}/Partials/_Number.cshtml | 0 .../Components/{ => SettingUi}/Partials/_Select.cshtml | 0 .../Pages/Components/{ => SettingUi}/Partials/_Text.cshtml | 0 .../Components/{ => SettingUi}/SettingViewComponent.cs | 7 +++---- .../Pages/Components/SettingUi/_ViewImports.cshtml | 1 + .../Pages/Components/_ViewImports.cshtml | 1 - .../SettingUiSettingPageContributor.cs} | 5 +++-- 11 files changed, 10 insertions(+), 9 deletions(-) rename src/EasyAbp.Abp.SettingUi.Web/Pages/Components/{ => SettingUi}/Default.cshtml (92%) rename src/EasyAbp.Abp.SettingUi.Web/Pages/Components/{ => SettingUi}/Default.css (100%) rename src/EasyAbp.Abp.SettingUi.Web/Pages/Components/{ => SettingUi}/Partials/_Checkbox.cshtml (100%) rename src/EasyAbp.Abp.SettingUi.Web/Pages/Components/{ => SettingUi}/Partials/_Number.cshtml (100%) rename src/EasyAbp.Abp.SettingUi.Web/Pages/Components/{ => SettingUi}/Partials/_Select.cshtml (100%) rename src/EasyAbp.Abp.SettingUi.Web/Pages/Components/{ => SettingUi}/Partials/_Text.cshtml (100%) rename src/EasyAbp.Abp.SettingUi.Web/Pages/Components/{ => SettingUi}/SettingViewComponent.cs (86%) create mode 100644 src/EasyAbp.Abp.SettingUi.Web/Pages/Components/SettingUi/_ViewImports.cshtml delete mode 100644 src/EasyAbp.Abp.SettingUi.Web/Pages/Components/_ViewImports.cshtml rename src/EasyAbp.Abp.SettingUi.Web/{Pages/SettingUiPageContributor.cs => Settings/SettingUiSettingPageContributor.cs} (86%) diff --git a/src/EasyAbp.Abp.SettingUi.Web/AbpSettingUiWebModule.cs b/src/EasyAbp.Abp.SettingUi.Web/AbpSettingUiWebModule.cs index 101bb41..8cd7a7a 100644 --- a/src/EasyAbp.Abp.SettingUi.Web/AbpSettingUiWebModule.cs +++ b/src/EasyAbp.Abp.SettingUi.Web/AbpSettingUiWebModule.cs @@ -1,4 +1,5 @@ using EasyAbp.Abp.SettingUi.Web.Pages; +using EasyAbp.Abp.SettingUi.Web.Settings; using Microsoft.Extensions.DependencyInjection; using Volo.Abp.AspNetCore.Mvc.UI.Bundling; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; @@ -35,7 +36,7 @@ public override void ConfigureServices(ServiceConfigurationContext context) Configure(options => { - options.Contributors.Add(new SettingUiPageContributor()); + options.Contributors.Add(new SettingUiSettingPageContributor()); }); Configure(options => diff --git a/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/Default.cshtml b/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/SettingUi/Default.cshtml similarity index 92% rename from src/EasyAbp.Abp.SettingUi.Web/Pages/Components/Default.cshtml rename to src/EasyAbp.Abp.SettingUi.Web/Pages/Components/SettingUi/Default.cshtml index 91ca480..a93c5a3 100644 --- a/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/Default.cshtml +++ b/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/SettingUi/Default.cshtml @@ -15,7 +15,7 @@ {
- @await Html.PartialAsync($"~/Pages/Components/Partials/_{settingHtmlInfo.Type.ToPascalCase()}.cshtml", settingHtmlInfo) + @await Html.PartialAsync($"~/Pages/Components/SettingUi/Partials/_{settingHtmlInfo.Type.ToPascalCase()}.cshtml", settingHtmlInfo)
}
diff --git a/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/Default.css b/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/SettingUi/Default.css similarity index 100% rename from src/EasyAbp.Abp.SettingUi.Web/Pages/Components/Default.css rename to src/EasyAbp.Abp.SettingUi.Web/Pages/Components/SettingUi/Default.css diff --git a/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/Partials/_Checkbox.cshtml b/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/SettingUi/Partials/_Checkbox.cshtml similarity index 100% rename from src/EasyAbp.Abp.SettingUi.Web/Pages/Components/Partials/_Checkbox.cshtml rename to src/EasyAbp.Abp.SettingUi.Web/Pages/Components/SettingUi/Partials/_Checkbox.cshtml diff --git a/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/Partials/_Number.cshtml b/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/SettingUi/Partials/_Number.cshtml similarity index 100% rename from src/EasyAbp.Abp.SettingUi.Web/Pages/Components/Partials/_Number.cshtml rename to src/EasyAbp.Abp.SettingUi.Web/Pages/Components/SettingUi/Partials/_Number.cshtml diff --git a/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/Partials/_Select.cshtml b/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/SettingUi/Partials/_Select.cshtml similarity index 100% rename from src/EasyAbp.Abp.SettingUi.Web/Pages/Components/Partials/_Select.cshtml rename to src/EasyAbp.Abp.SettingUi.Web/Pages/Components/SettingUi/Partials/_Select.cshtml diff --git a/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/Partials/_Text.cshtml b/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/SettingUi/Partials/_Text.cshtml similarity index 100% rename from src/EasyAbp.Abp.SettingUi.Web/Pages/Components/Partials/_Text.cshtml rename to src/EasyAbp.Abp.SettingUi.Web/Pages/Components/SettingUi/Partials/_Text.cshtml diff --git a/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/SettingViewComponent.cs b/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/SettingUi/SettingViewComponent.cs similarity index 86% rename from src/EasyAbp.Abp.SettingUi.Web/Pages/Components/SettingViewComponent.cs rename to src/EasyAbp.Abp.SettingUi.Web/Pages/Components/SettingUi/SettingViewComponent.cs index 500fab9..7565db2 100644 --- a/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/SettingViewComponent.cs +++ b/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/SettingUi/SettingViewComponent.cs @@ -5,17 +5,16 @@ using Microsoft.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc.UI.Widgets; -using Volo.Abp.Data; -namespace EasyAbp.Abp.SettingUi.Web.Pages.Components +namespace EasyAbp.Abp.SettingUi.Web.Pages.Components.SettingUi { - [Widget(StyleFiles = new[] { "/Pages/Components/Default.css" })] + [Widget(StyleFiles = new[] { "/Pages/Components/SettingUi/Default.css" })] public class SettingViewComponent : AbpViewComponent { public IViewComponentResult Invoke(SettingGroup parameter) { var settingInfos = parameter.SettingInfos.Select(si => new SettingHtmlInfo(si)); - return View("~/Pages/Components/Default.cshtml", settingInfos); + return View("~/Pages/Components/SettingUi/Default.cshtml", settingInfos); } } diff --git a/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/SettingUi/_ViewImports.cshtml b/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/SettingUi/_ViewImports.cshtml new file mode 100644 index 0000000..859f36b --- /dev/null +++ b/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/SettingUi/_ViewImports.cshtml @@ -0,0 +1 @@ +@using EasyAbp.Abp.SettingUi.Web.Pages.Components.SettingUi \ No newline at end of file diff --git a/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/_ViewImports.cshtml b/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/_ViewImports.cshtml deleted file mode 100644 index 8414929..0000000 --- a/src/EasyAbp.Abp.SettingUi.Web/Pages/Components/_ViewImports.cshtml +++ /dev/null @@ -1 +0,0 @@ -@using EasyAbp.Abp.SettingUi.Web.Pages.Components \ No newline at end of file diff --git a/src/EasyAbp.Abp.SettingUi.Web/Pages/SettingUiPageContributor.cs b/src/EasyAbp.Abp.SettingUi.Web/Settings/SettingUiSettingPageContributor.cs similarity index 86% rename from src/EasyAbp.Abp.SettingUi.Web/Pages/SettingUiPageContributor.cs rename to src/EasyAbp.Abp.SettingUi.Web/Settings/SettingUiSettingPageContributor.cs index fab25f0..b46d1ce 100644 --- a/src/EasyAbp.Abp.SettingUi.Web/Pages/SettingUiPageContributor.cs +++ b/src/EasyAbp.Abp.SettingUi.Web/Settings/SettingUiSettingPageContributor.cs @@ -1,13 +1,14 @@ using System.Threading.Tasks; using EasyAbp.Abp.SettingUi.Authorization; using EasyAbp.Abp.SettingUi.Web.Pages.Components; +using EasyAbp.Abp.SettingUi.Web.Pages.Components.SettingUi; using Microsoft.AspNetCore.Authorization; using Microsoft.Extensions.DependencyInjection; using Volo.Abp.SettingManagement.Web.Pages.SettingManagement; -namespace EasyAbp.Abp.SettingUi.Web.Pages +namespace EasyAbp.Abp.SettingUi.Web.Settings { - public class SettingUiPageContributor : ISettingPageContributor + public class SettingUiSettingPageContributor : ISettingPageContributor { public async Task ConfigureAsync(SettingPageCreationContext context) {