From 2ba103414f2ca683a164bb8745db7c1dd5a4faad Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Sat, 29 Sep 2018 12:00:02 -0500 Subject: [PATCH] restore Syntax to details expander closes #532 --- .../Syntax/Models/SyntaxDto.cs | 1 + .../detailsExpander/infoCard/InfoCard.tsx | 2 +- .../detailsExpander/infoCard/Syntax.tsx | 15 ++++++++++----- .../ClientApp/modules/home/interfaces/ISyntax.ts | 1 + 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/FilterLists.Services/Syntax/Models/SyntaxDto.cs b/src/FilterLists.Services/Syntax/Models/SyntaxDto.cs index 9b72d2001..e3322bff4 100644 --- a/src/FilterLists.Services/Syntax/Models/SyntaxDto.cs +++ b/src/FilterLists.Services/Syntax/Models/SyntaxDto.cs @@ -7,6 +7,7 @@ namespace FilterLists.Services.Syntax.Models public class SyntaxDto { public int Id { get; set; } + public string DefinitionUrl { get; set; } public List FilterListIds { get; set; } public string Name { get; set; } public List SoftwareIds { get; set; } diff --git a/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/infoCard/InfoCard.tsx b/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/infoCard/InfoCard.tsx index 11d04f630..a1c88246e 100644 --- a/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/infoCard/InfoCard.tsx +++ b/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/infoCard/InfoCard.tsx @@ -50,7 +50,7 @@ export const InfoCard = (props: IProps) => ? null : } - + { /**/ } ; \ No newline at end of file diff --git a/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/infoCard/Syntax.tsx b/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/infoCard/Syntax.tsx index 928f0c47c..3a3356b85 100644 --- a/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/infoCard/Syntax.tsx +++ b/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/infoCard/Syntax.tsx @@ -1,12 +1,17 @@ import * as React from "react"; +import { ISyntax } from "../../../interfaces"; -export const Syntax = (props: any) => - props.name - ? (props.definitionUrl +interface IProps { + syntax: ISyntax; +}; + +export const Syntax = (props: IProps) => + props.syntax + ? (props.syntax.definitionUrl ?
  • -

    Syntax: {props.name}

    +

    Syntax: {props.syntax.name}

  • :
  • -

    Syntax: {props.name}

    +

    Syntax: {props.syntax.name}

  • ) : null; \ No newline at end of file diff --git a/src/FilterLists.Web/ClientApp/modules/home/interfaces/ISyntax.ts b/src/FilterLists.Web/ClientApp/modules/home/interfaces/ISyntax.ts index cfba374af..2dd8fc9ee 100644 --- a/src/FilterLists.Web/ClientApp/modules/home/interfaces/ISyntax.ts +++ b/src/FilterLists.Web/ClientApp/modules/home/interfaces/ISyntax.ts @@ -1,5 +1,6 @@ export interface ISyntax { id: number; + definitionUrl: string; filterListIds: number[]; name: string; softwareIds: number[];