From 95065347877009f52a1fac394a5ac2ee31fb2d56 Mon Sep 17 00:00:00 2001 From: Collin Barrett Date: Tue, 27 Mar 2018 06:23:55 -0500 Subject: [PATCH] add syntax/software interface, refactor large functions --- .../ClientApp/components/ListDetails.tsx | 138 +++++++++++------- 1 file changed, 82 insertions(+), 56 deletions(-) diff --git a/src/FilterLists.Web/ClientApp/components/ListDetails.tsx b/src/FilterLists.Web/ClientApp/components/ListDetails.tsx index 359a8af77..6394a0697 100644 --- a/src/FilterLists.Web/ClientApp/components/ListDetails.tsx +++ b/src/FilterLists.Web/ClientApp/components/ListDetails.tsx @@ -37,27 +37,8 @@ function FilterListDetails(props: any) {
-
- -
    - - - - -
-
-
- - - - - - - - - - -
+ +
@@ -67,6 +48,33 @@ function FilterListDetails(props: any) {
; } +function ListInfo(props: any) { + return
+ +
    + + + + +
+
; +} + +function ListUrls(props: any) { + return
+ + + + + + + + + + +
; +} + function Description(props: any) { return props.description ? (props.url @@ -223,51 +231,57 @@ function Maintainer(props: any) {

Maintained by {props.maintainer.name}

-
- {props.maintainer.additionalLists.length > 0 - ?
-

More by {props.maintainer.name}:

-
    - {props.maintainer.additionalLists.map( - (list: any) => )} -
-
- : null} -
-
- {props.maintainer.homeUrl - ? - Home - - : null} - {props.maintainer.emailAddress - ? - Email - - : null} - {props.maintainer.twitterHandle - ? - Twitter - - : null} -
+ +
; } +function MaintainerAdditionalLists(props: any) { + return
+ {props.maintainer.additionalLists.length > 0 + ?
+

More by {props.maintainer.name}:

+
    + {props.maintainer.additionalLists.map( + (list: any) => )} +
+
+ : null} +
; +} + function MaintainerAdditionalList(props: any) { return
  • {props.list.name}
  • ; } +function MaintainerUrls(props: any) { + return
    + {props.maintainer.homeUrl + ? + Home + + : null} + {props.maintainer.emailAddress + ? + Email + + : null} + {props.maintainer.twitterHandle + ? + Twitter + + : null} +
    ; +} + interface IFilterListDetailsDto { chatUrl: string; description: string; @@ -284,6 +298,7 @@ interface IFilterListDetailsDto { policyUrl: string; publishedDate: string; submissionUrl: string; + syntax: IListSyntaxDto[]; viewUrl: string; } @@ -304,4 +319,15 @@ interface IListMaintainerDto { interface IMaintainerAdditionalListsDto { id: number; name: string; +} + +interface IListSyntaxDto { + definitionUrl: string; + name: string; + supportedSoftware: ISyntaxSupportedSoftwareDto[]; +} + +interface ISyntaxSupportedSoftwareDto { + homeUrl: string; + name: string; } \ No newline at end of file