mirror of
https://github.com/Lissy93/web-check.git
synced 2025-08-16 23:51:11 +02:00
Updates result components, adds card docs
This commit is contained in:
@ -12,6 +12,8 @@ export const StyledCard = styled.section<{ styles?: string}>`
|
||||
padding: 1rem;
|
||||
position: relative;
|
||||
margin 0.5rem;
|
||||
max-height: 64rem;
|
||||
overflow: auto;
|
||||
${props => props.styles}
|
||||
`;
|
||||
|
||||
|
@ -19,7 +19,7 @@ const DnsServerCard = (props: {data: any, title: string, actionButtons: any }):
|
||||
<Card heading={props.title} actionButtons={props.actionButtons} styles={cardStyles}>
|
||||
{dnsSecurity.dns.map((dns: any, index: number) => {
|
||||
return (<>
|
||||
<Heading as="h4" size="small" color={colors.primary}>DNS Server #{index+1}</Heading>
|
||||
{ dnsSecurity.dns.length > 1 && <Heading as="h4" size="small" color={colors.primary}>DNS Server #{index+1}</Heading> }
|
||||
<Row lbl="IP Address" val={dns.address} />
|
||||
<Row lbl="Hostname" val={dns.hostname} />
|
||||
<Row lbl="DoH Support" val={dns.dohDirectSupports ? '✅ Yes*' : '❌ No*'} />
|
||||
|
@ -19,7 +19,6 @@ const cardStyles = `
|
||||
`;
|
||||
|
||||
const SitemapCard = (props: {data: any, title: string, actionButtons: any }): JSX.Element => {
|
||||
console.log(props.data);
|
||||
const normalSiteMap = props.data.url || props.data.urlset?.url || null;
|
||||
const siteMapIndex = props.data.sitemapindex?.sitemap || null;
|
||||
|
||||
@ -32,8 +31,12 @@ const SitemapCard = (props: {data: any, title: string, actionButtons: any }): JS
|
||||
};
|
||||
|
||||
const getPathFromUrl = (url: string) => {
|
||||
const urlObj = new URL(url);
|
||||
return urlObj.pathname;
|
||||
try {
|
||||
const urlObj = new URL(url);
|
||||
return urlObj.pathname;
|
||||
} catch (e) {
|
||||
return url;
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
|
@ -62,8 +62,9 @@ h4 {
|
||||
}
|
||||
}
|
||||
.tech-icon {
|
||||
width: 2.5rem;
|
||||
min-width: 2.5rem;
|
||||
border-radius: 4px;
|
||||
margin: 0.5rem 0;
|
||||
}
|
||||
&:not(:last-child) {
|
||||
border-bottom: 1px solid ${colors.primary};
|
||||
|
@ -5,6 +5,7 @@ import Row from 'components/Form/Row';
|
||||
const cardStyles = `
|
||||
grid-column: span 2;
|
||||
span.val { max-width: 32rem !important; }
|
||||
span { overflow: hidden; }
|
||||
`;
|
||||
|
||||
const TxtRecordCard = (props: {data: any, title: string, actionButtons: any }): JSX.Element => {
|
||||
|
@ -187,12 +187,11 @@ const jobNames = [
|
||||
'domain',
|
||||
'dns',
|
||||
'dns-server',
|
||||
'domain-lookup',
|
||||
'tech-stack',
|
||||
'hosts',
|
||||
'quality',
|
||||
'cookies',
|
||||
'server-info',
|
||||
// 'server-info',
|
||||
'redirects',
|
||||
'robots-txt',
|
||||
'dnssec',
|
||||
|
Reference in New Issue
Block a user