Skip to content

Commit

Permalink
Merge pull request #108 from EasyAbp/move-widget
Browse files Browse the repository at this point in the history
Move the widget to the `SettingUi` directory
  • Loading branch information
gdlcf88 authored Feb 8, 2024
2 parents c0c0551 + 17ddd5b commit 52a66dd
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/EasyAbp.Abp.SettingUi.Web/AbpSettingUiWebModule.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -35,7 +36,7 @@ public override void ConfigureServices(ServiceConfigurationContext context)

Configure<SettingManagementPageOptions>(options =>
{
options.Contributors.Add(new SettingUiPageContributor());
options.Contributors.Add(new SettingUiSettingPageContributor());
});

Configure<AbpBundlingOptions>(options =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{
<div class="mb-3">
<label class="form-label" for="@settingHtmlInfo.Name">@settingHtmlInfo.DisplayName</label>
@await Html.PartialAsync($"~/Pages/Components/Partials/_{settingHtmlInfo.Type.ToPascalCase()}.cshtml", settingHtmlInfo)
@await Html.PartialAsync($"~/Pages/Components/SettingUi/Partials/_{settingHtmlInfo.Type.ToPascalCase()}.cshtml", settingHtmlInfo)
</div>
}
<hr class="my-3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@using EasyAbp.Abp.SettingUi.Web.Pages.Components.SettingUi

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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)
{
Expand Down

0 comments on commit 52a66dd

Please sign in to comment.