Use AbpMvcOptions to get the login url

pull/5153/head
Halil İbrahim Kalkan 5 years ago
parent b7fad45ec4
commit a835f9bc27

@ -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";
}
}
}

@ -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