diff --git a/src/components/Form/Heading.tsx b/src/components/Form/Heading.tsx index 2091f85..2df91aa 100644 --- a/src/components/Form/Heading.tsx +++ b/src/components/Form/Heading.tsx @@ -17,6 +17,7 @@ const StyledHeading = styled.h1` display: flex; gap: 1rem; align-items: center; + font-size: ${TextSizes.medium}; img { // Some titles have an icon width: 2rem; border-radius: 4px; @@ -27,8 +28,8 @@ const StyledHeading = styled.h1` } ${props => { switch (props.size) { - case 'xSmall': return `font-size: ${TextSizes.small};`; - case 'small': return `font-size: ${TextSizes.medium};`; + case 'xSmall': return `font-size: ${TextSizes.xSmall};`; + case 'small': return `font-size: ${TextSizes.small};`; case 'medium': return `font-size: ${TextSizes.large};`; case 'large': return `font-size: ${TextSizes.xLarge};`; } diff --git a/src/components/Form/Row.tsx b/src/components/Form/Row.tsx index ea96860..757b782 100644 --- a/src/components/Form/Row.tsx +++ b/src/components/Form/Row.tsx @@ -1,11 +1,13 @@ +import { ReactNode } from 'react'; import styled from 'styled-components'; import colors from 'styles/colors'; +import Heading from 'components/Form/Heading'; export interface RowProps { lbl: string, val: string, key?: string, - children?: JSX.Element[], + children?: ReactNode, rowList?: RowProps[], title?: string, } @@ -100,12 +102,28 @@ export const ExpandableRow = (props: RowProps) => { ); }; +export const ListRow = (props: { list: string[], title: string }) => { + const { list, title } = props; + return ( + <> + {title} + { list.map((entry: string, index: number) => { + return ( + + { entry } + + )} + )} + +); +} + const Row = (props: RowProps) => { const { lbl, val, key, title, children } = props; if (children) return {children}; return ( - {lbl} + { lbl && {lbl} } copyToClipboard(val)}> {formatValue(val)} diff --git a/src/components/Results/BuiltWith.tsx b/src/components/Results/BuiltWith.tsx index 781c1d5..4a6bc4e 100644 --- a/src/components/Results/BuiltWith.tsx +++ b/src/components/Results/BuiltWith.tsx @@ -37,7 +37,7 @@ const ListRow = (props: { list: Technology[], title: string }) => { const { list, title } = props; return ( <> - {title} + {title} { list.map((entry: Technology, index: number) => { return ( { entry.Name } @@ -52,7 +52,7 @@ const BuiltWithCard = (props: { technologies: TechnologyGroup[] }): JSX.Element const { technologies } = props; return ( - Technologies + Technologies { technologies.map((group: TechnologyGroup) => { return ( diff --git a/src/components/Results/Cookies.tsx b/src/components/Results/Cookies.tsx index bcb4da4..cd05139 100644 --- a/src/components/Results/Cookies.tsx +++ b/src/components/Results/Cookies.tsx @@ -11,7 +11,7 @@ const CookiesCard = (props: { cookies: any }): JSX.Element => { const cookies = props.cookies; return ( - Cookies + Cookies { cookies.length === 0 &&

No cookies found.

} diff --git a/src/components/Results/DnsRecords.tsx b/src/components/Results/DnsRecords.tsx new file mode 100644 index 0000000..f5b6704 --- /dev/null +++ b/src/components/Results/DnsRecords.tsx @@ -0,0 +1,34 @@ + +import styled from 'styled-components'; +import colors from 'styles/colors'; +import Card from 'components/Form/Card'; +import Heading from 'components/Form/Heading'; +import Row, { ListRow, RowProps } from 'components/Form/Row'; + +const Outer = styled(Card)` + .content { + max-height: 28rem; + overflow-y: auto; + } +`; + +const DnsRecordsCard = (props: { dnsRecords: any }): JSX.Element => { + const dnsRecords = props.dnsRecords; + return ( + + DNS Records +
+ { dnsRecords.A && } + { dnsRecords.AAAA?.length > 0 && } + { dnsRecords.MX?.length > 0 && } + { dnsRecords.CNAME?.length > 0 && } + { dnsRecords.NS?.length > 0 && } + { dnsRecords.PTR?.length > 0 && } + { dnsRecords.SOA?.length > 0 && } +
+
+ ); +} + +export default DnsRecordsCard; + diff --git a/src/components/Results/Headers.tsx b/src/components/Results/Headers.tsx index 741d08e..2af2974 100644 --- a/src/components/Results/Headers.tsx +++ b/src/components/Results/Headers.tsx @@ -13,7 +13,7 @@ const HeadersCard = (props: { headers: any }): JSX.Element => { const headers = props.headers; return ( - Headers + Headers { Object.keys(headers).map((header: string, index: number) => { return ( diff --git a/src/components/Results/HostNames.tsx b/src/components/Results/HostNames.tsx index 2720c00..3c828df 100644 --- a/src/components/Results/HostNames.tsx +++ b/src/components/Results/HostNames.tsx @@ -6,7 +6,7 @@ import Card from 'components/Form/Card'; import Heading from 'components/Form/Heading'; const Outer = styled(Card)` - max-height: 20rem; + max-height: 28rem; overflow: auto; `; @@ -22,7 +22,7 @@ const HostListSection = (props: { list: string[], title: string }) => { const { list, title } = props; return ( <> - {title} + {title} { list.map((entry: string, index: number) => { return ( { entry } diff --git a/src/components/Results/Lighthouse.tsx b/src/components/Results/Lighthouse.tsx index 0f990c9..6625bba 100644 --- a/src/components/Results/Lighthouse.tsx +++ b/src/components/Results/Lighthouse.tsx @@ -95,7 +95,7 @@ const LighthouseCard = (props: { lighthouse: any }): JSX.Element => { return ( - Performance + Performance { Object.keys(categories).map((title: string, index: number) => { const scoreIds = categories[title].auditRefs.map((ref: { id: string }) => ref.id); const scoreList = scoreIds.map((id: string) => { diff --git a/src/components/Results/RobotsTxt.tsx b/src/components/Results/RobotsTxt.tsx index 105b364..46c9321 100644 --- a/src/components/Results/RobotsTxt.tsx +++ b/src/components/Results/RobotsTxt.tsx @@ -7,7 +7,7 @@ import Row, { RowProps } from 'components/Form/Row'; const Outer = styled(Card)` .content { - max-height: 20rem; + max-height: 28rem; overflow-y: auto; } `; @@ -15,7 +15,7 @@ const Outer = styled(Card)` const RobotsTxtCard = (props: { robotTxt: RowProps[] }): JSX.Element => { return ( - Crawl Rules + Crawl Rules
{ props.robotTxt.length === 0 &&

No crawl rules found.

diff --git a/src/components/Results/Screenshot.tsx b/src/components/Results/Screenshot.tsx index 925a1cb..dbaf18c 100644 --- a/src/components/Results/Screenshot.tsx +++ b/src/components/Results/Screenshot.tsx @@ -10,13 +10,14 @@ max-height: 28rem; img { border-radius: 6px; width: 100%; + margin 0.5rem 0;; } `; const ScreenshotCard = (props: { screenshot: string }): JSX.Element => { return ( - Screenshot + Screenshot Full page screenshot ); diff --git a/src/components/Results/ServerInfo.tsx b/src/components/Results/ServerInfo.tsx index ccb16a2..af07acc 100644 --- a/src/components/Results/ServerInfo.tsx +++ b/src/components/Results/ServerInfo.tsx @@ -12,7 +12,7 @@ const ServerInfoCard = (info: ServerInfo): JSX.Element => { const { org, asn, isp, os, ports, ip, loc, type } = info; return ( - Server Info + Server Info { org && } { (isp && isp !== org) && } { os && } diff --git a/src/components/Results/ServerLocation.tsx b/src/components/Results/ServerLocation.tsx index 4c4bc34..4f6aadd 100644 --- a/src/components/Results/ServerLocation.tsx +++ b/src/components/Results/ServerLocation.tsx @@ -40,7 +40,7 @@ const ServerLocationCard = (location: ServerLocation): JSX.Element => { return ( - Location + Location Country diff --git a/src/components/Results/SslCert.tsx b/src/components/Results/SslCert.tsx index 79579d1..e9571c1 100644 --- a/src/components/Results/SslCert.tsx +++ b/src/components/Results/SslCert.tsx @@ -70,7 +70,7 @@ const ListRow = (props: { list: string[], title: string }) => { const { list, title } = props; return ( <> - {title} + {title} { list.map((entry: string, index: number) => { return ( { entry } @@ -84,7 +84,7 @@ const SslCertCard = (props: { sslCert: any }): JSX.Element => { const { subject, issuer, fingerprint, serialNumber, asn1Curve, nistCurve, valid_to, valid_from, ext_key_usage } = props.sslCert; return ( - SSL Info + SSL Info { subject && } { issuer?.O && } diff --git a/src/components/Results/WhoIs.tsx b/src/components/Results/WhoIs.tsx index df41820..123bd77 100644 --- a/src/components/Results/WhoIs.tsx +++ b/src/components/Results/WhoIs.tsx @@ -59,7 +59,7 @@ const ServerInfoCard = (whois: Whois): JSX.Element => { const { created, updated, expires, nameservers } = whois; return ( - Who Is Info + Who Is Info { created && } { updated && } { expires && }