Skip to content

Commit

Permalink
Move ReactionSelectionViewModel and ReactionViewModel into ReactionSe…
Browse files Browse the repository at this point in the history
…lectionViewComponent as nested classes.
  • Loading branch information
hikalkan committed Jul 19, 2020
1 parent 8592ed3 commit 849f737
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 35 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@model Volo.CmsKit.Web.Pages.CmsKit.Shared.Components.ReactionSelection.ReactionSelectionViewModel
@model Volo.CmsKit.Web.Pages.CmsKit.Shared.Components.ReactionSelection.ReactionSelectionViewComponent.ReactionSelectionViewModel
<span class="cms-reaction-area" data-entity-type="@Model.EntityType" data-entity-id="@Model.EntityId">
<a class="cms-reaction-select-icon" tabindex="0"><i class="fa fa-smile-o"></i></a>
<div class="cms-reaction-selection-popover-content" style="display: none">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.Mvc;
Expand Down Expand Up @@ -56,5 +57,30 @@ public virtual async Task<IViewComponentResult> InvokeAsync(

return View("~/Pages/CmsKit/Shared/Components/ReactionSelection/Default.cshtml", viewModel);
}

public class ReactionSelectionViewModel
{
public string EntityType { get; set; }

public string EntityId { get; set; }

public List<ReactionViewModel> Reactions { get; set; }
}

public class ReactionViewModel
{
[NotNull]
public string Name { get; set; }

[CanBeNull]
public string DisplayName { get; set; }

[NotNull]
public string Icon { get; set; }

public int Count { get; set; }

public bool IsSelectedByCurrentUser { get; set; }
}
}
}

This file was deleted.

This file was deleted.

0 comments on commit 849f737

Please sign in to comment.