Browse Source

Use AbpMvcOptions to get the login url

pull/5163/head
Halil İbrahim Kalkan 6 years ago
parent
commit
a835f9bc27
  1. 6
      modules/cms-kit/src/Volo.CmsKit.Common.Web/CmsKitUiOptions.cs
  2. 4
      modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/CommentingViewComponent.cs

6
modules/cms-kit/src/Volo.CmsKit.Common.Web/CmsKitUiOptions.cs

@ -8,15 +8,9 @@ namespace Volo.CmsKit.Web
[NotNull]
public ReactionIconDictionary ReactionIcons { get; }
/// <summary>
/// Default value: "/Account/Login".
/// </summary>
public string LoginUrl { get; set; } //TODO: Consider to move to the ABP Framework!
public CmsKitUiOptions()
{
ReactionIcons = new ReactionIconDictionary();
LoginUrl = "/Account/Login";
}
}
}

4
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/CommentingViewComponent.cs

@ -19,11 +19,11 @@ namespace Volo.CmsKit.Public.Web.Pages.CmsKit.Shared.Components.Commenting
public class CommentingViewComponent : AbpViewComponent
{
public ICommentPublicAppService CommentPublicAppService { get; }
public CmsKitUiOptions Options { get; }
public AbpMvcOptions AbpMvcOptions { get; }
public CommentingViewComponent(
ICommentPublicAppService commentPublicAppService,
IOptions<CmsKitUiOptions> options)
IOptions<AbpMvcOptions> options)
{
CommentPublicAppService = commentPublicAppService;
Options = options.Value;

Loading…
Cancel
Save