diff --git a/src/FilterLists.Services/FilterList/FilterListService.cs b/src/FilterLists.Services/FilterList/FilterListService.cs index 574745071..c8cc06125 100644 --- a/src/FilterLists.Services/FilterList/FilterListService.cs +++ b/src/FilterLists.Services/FilterList/FilterListService.cs @@ -75,7 +75,7 @@ await DbContext.Snapshots.AsNoTracking() .CountAsync(); } - private async Task GetUpdatedDate(ListDetailsDto details) + private async Task GetUpdatedDate(ListDetailsDto details) { return await DbContext.Snapshots.AsNoTracking() .Where(s => s.FilterListId == details.Id && s.IsCompleted && diff --git a/src/FilterLists.Services/FilterList/ListDetailsDto.cs b/src/FilterLists.Services/FilterList/ListDetailsDto.cs index 34ff86232..1987bbd05 100644 --- a/src/FilterLists.Services/FilterList/ListDetailsDto.cs +++ b/src/FilterLists.Services/FilterList/ListDetailsDto.cs @@ -8,6 +8,7 @@ namespace FilterLists.Services.FilterList public class ListDetailsDto { public int Id { get; set; } + public DateTime AddedDate { get; set; } public string ChatUrl { get; set; } public string Description { get; set; } public string DescriptionSourceUrl { get; set; } @@ -26,7 +27,7 @@ public class ListDetailsDto public int RuleCount { get; set; } public string SubmissionUrl { get; set; } public ListSyntaxDto Syntax { get; set; } - public DateTime? UpdatedDate { get; set; } + public DateTime UpdatedDate { get; set; } public string ViewUrl { get; set; } } } \ No newline at end of file diff --git a/src/FilterLists.Services/FilterList/MappingProfiles.cs b/src/FilterLists.Services/FilterList/MappingProfiles.cs index 457083f58..53dd9160a 100644 --- a/src/FilterLists.Services/FilterList/MappingProfiles.cs +++ b/src/FilterLists.Services/FilterList/MappingProfiles.cs @@ -17,7 +17,8 @@ public MappingProfiles() conf => conf.MapFrom(list => list.FilterListLanguages.Select(listLangs => listLangs.Language.Name))) .ForMember(dto => dto.Maintainers, conf => conf.MapFrom(list => - list.FilterListMaintainers.Select(listMaints => listMaints.Maintainer))); + list.FilterListMaintainers.Select(listMaints => listMaints.Maintainer))) + .ForMember(dto => dto.AddedDate, conf => conf.MapFrom(list => list.CreatedDateUtc)); CreateMap() .ForMember(dto => dto.AdditionalLists, conf => conf.MapFrom(maint => diff --git a/src/FilterLists.Web/ClientApp/components/ListDetails.tsx b/src/FilterLists.Web/ClientApp/components/ListDetails.tsx index d82bd8bf0..a7b6007a6 100644 --- a/src/FilterLists.Web/ClientApp/components/ListDetails.tsx +++ b/src/FilterLists.Web/ClientApp/components/ListDetails.tsx @@ -57,6 +57,7 @@ function ListInfo(props: any) { + @@ -122,7 +123,15 @@ function DiscontinuedDate(props: any) { function UpdatedDate(props: any) { return props.date ?
  • -

    Updated: {moment(props.date).format("MMM D, Y")}

    +

    Last Updated: {moment(props.date).format("MMM D, Y")}

    +
  • + : null; +} + +function AddedDate(props: any) { + return props.date + ?
  • +

    Added to FilterLists: {moment(props.date).format("MMM D, Y")}

  • : null; } @@ -301,6 +310,7 @@ function MaintainerUrls(props: any) { } interface IFilterListDetailsDto { + addedDate: string; chatUrl: string; description: string; descriptionSourceUrl: string;