Skip to content

Commit f01e22a

Browse files
authored
Merge pull request #21 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents f9fb3b2 + 330d5c5 commit f01e22a

4 files changed

Lines changed: 1076 additions & 944 deletions

File tree

Lines changed: 39 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,45 @@
1-
import React, { useState } from "react";
2-
import { Box, Card, Stack, SvgIcon, Typography, Skeleton, Tooltip } from "@mui/material";
3-
import { Grid } from "@mui/system";
4-
import { CippOffCanvas } from "../CippComponents/CippOffCanvas";
5-
import { CippPropertyListCard } from "./CippPropertyListCard";
1+
import React, { useState, Fragment } from 'react'
2+
import { Box, Card, Stack, SvgIcon, Typography, Skeleton, Tooltip } from '@mui/material'
3+
import { Grid } from '@mui/system'
4+
import { CippOffCanvas } from '../CippComponents/CippOffCanvas'
5+
import { CippPropertyListCard } from './CippPropertyListCard'
66

77
export const CippInfoBar = ({ data, isFetching }) => {
8-
const [visibleIndex, setVisibleIndex] = useState(null);
8+
const [visibleIndex, setVisibleIndex] = useState(null)
99

1010
return (
1111
<Card>
1212
<Grid container>
1313
{data.map((item, index) => (
14-
<>
14+
<Fragment key={item.name}>
1515
<Grid
1616
size={{ md: 3, sm: 6, xs: 12 }}
17-
key={item.name}
1817
onClick={item.offcanvas ? () => setVisibleIndex(index) : undefined}
1918
sx={{
20-
cursor: item.offcanvas ? "pointer" : "default",
19+
cursor: item.offcanvas ? 'pointer' : 'default',
2120
borderBottom: (theme) => ({
2221
xs: `1px solid ${theme.palette.divider}`,
23-
md: "none",
22+
md: 'none',
2423
}),
2524
borderRight: (theme) => ({
2625
md: `1px solid ${theme.palette.divider}`,
2726
}),
28-
"&:nth-of-type(3)": {
27+
'&:nth-of-type(3)': {
2928
borderBottom: (theme) => ({
3029
xs: `1px solid ${theme.palette.divider}`,
31-
sm: "none",
30+
sm: 'none',
3231
}),
3332
},
34-
"&:nth-of-type(4)": {
35-
borderBottom: "none",
36-
borderRight: "none",
33+
'&:nth-of-type(4)': {
34+
borderBottom: 'none',
35+
borderRight: 'none',
3736
},
3837
}}
3938
>
4039
<Stack alignItems="center" direction="row" spacing={2} sx={{ p: 2, minWidth: 0 }}>
4140
{item?.icon && (
4241
<SvgIcon
43-
color={item.color ? item.color : "primary"}
42+
color={item.color ? item.color : 'primary'}
4443
fontSize="small"
4544
sx={{ flexShrink: 0 }}
4645
>
@@ -52,57 +51,57 @@ export const CippInfoBar = ({ data, isFetching }) => {
5251
<Box
5352
sx={() => {
5453
if (!item?.icon) {
55-
return { pl: 2, minWidth: 0, flex: 1 };
54+
return { pl: 2, minWidth: 0, flex: 1 }
5655
}
57-
return { minWidth: 0, flex: 1 };
56+
return { minWidth: 0, flex: 1 }
5857
}}
5958
>
6059
<Typography
6160
color="text.secondary"
6261
variant="overline"
6362
sx={{
64-
display: "block",
65-
overflow: "hidden",
66-
textOverflow: "ellipsis",
67-
whiteSpace: "nowrap",
63+
display: 'block',
64+
overflow: 'hidden',
65+
textOverflow: 'ellipsis',
66+
whiteSpace: 'nowrap',
6867
}}
6968
>
7069
{item.name}
7170
</Typography>
7271
<Typography
7372
variant="h6"
74-
sx={{ overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }}
73+
sx={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}
7574
>
76-
{isFetching ? <Skeleton width={"100%"} /> : item.data}
75+
{isFetching ? <Skeleton width={'100%'} /> : item.data}
7776
</Typography>
7877
</Box>
7978
</Tooltip>
8079
) : (
8180
<Box
8281
sx={() => {
8382
if (!item?.icon) {
84-
return { pl: 2, minWidth: 0, flex: 1 };
83+
return { pl: 2, minWidth: 0, flex: 1 }
8584
}
86-
return { minWidth: 0, flex: 1 };
85+
return { minWidth: 0, flex: 1 }
8786
}}
8887
>
8988
<Typography
9089
color="text.secondary"
9190
variant="overline"
9291
sx={{
93-
display: "block",
94-
overflow: "hidden",
95-
textOverflow: "ellipsis",
96-
whiteSpace: "nowrap",
92+
display: 'block',
93+
overflow: 'hidden',
94+
textOverflow: 'ellipsis',
95+
whiteSpace: 'nowrap',
9796
}}
9897
>
9998
{item.name}
10099
</Typography>
101100
<Typography
102101
variant="h6"
103-
sx={{ overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }}
102+
sx={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}
104103
>
105-
{isFetching ? <Skeleton width={"100%"} /> : item.data}
104+
{isFetching ? <Skeleton width={'100%'} /> : item.data}
106105
</Typography>
107106
</Box>
108107
)}
@@ -111,17 +110,17 @@ export const CippInfoBar = ({ data, isFetching }) => {
111110
{item.offcanvas && (
112111
<>
113112
<CippOffCanvas
114-
title={item?.offcanvas?.title || "Details"}
113+
title={item?.offcanvas?.title || 'Details'}
115114
size="md"
116115
visible={visibleIndex === index}
117116
onClose={() => setVisibleIndex(null)}
118117
>
119118
<Box
120119
sx={{
121-
overflowY: "auto",
122-
maxHeight: "100%",
123-
display: "flex",
124-
flexDirection: "column",
120+
overflowY: 'auto',
121+
maxHeight: '100%',
122+
display: 'flex',
123+
flexDirection: 'column',
125124
}}
126125
>
127126
<Grid container spacing={1}>
@@ -140,9 +139,9 @@ export const CippInfoBar = ({ data, isFetching }) => {
140139
</CippOffCanvas>
141140
</>
142141
)}
143-
</>
142+
</Fragment>
144143
))}
145144
</Grid>
146145
</Card>
147-
);
148-
};
146+
)
147+
}

src/data/standards.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5998,6 +5998,12 @@
59985998
"placeholder": "e.g. https://example.com/*",
59995999
"helperText": "Enter URLs to allowlist in the extension. Press enter to add each URL. Wildcards are allowed. This should be used for sites that are being blocked by the extension but are known to be safe."
60006000
},
6001+
{
6002+
"type": "switch",
6003+
"name": "standards.DeployCheckChromeExtension.domainSquattingEnabled",
6004+
"label": "Enable domain squatting detection",
6005+
"defaultValue": true
6006+
},
60016007
{
60026008
"type": "textField",
60036009
"name": "standards.DeployCheckChromeExtension.companyName",
@@ -6026,6 +6032,27 @@
60266032
"placeholder": "support@yourcompany.com",
60276033
"required": false
60286034
},
6035+
{
6036+
"type": "textField",
6037+
"name": "standards.DeployCheckChromeExtension.supportUrl",
6038+
"label": "Support URL",
6039+
"placeholder": "https://support.yourcompany.com",
6040+
"required": false
6041+
},
6042+
{
6043+
"type": "textField",
6044+
"name": "standards.DeployCheckChromeExtension.privacyPolicyUrl",
6045+
"label": "Privacy Policy URL",
6046+
"placeholder": "https://yourcompany.com/privacy",
6047+
"required": false
6048+
},
6049+
{
6050+
"type": "textField",
6051+
"name": "standards.DeployCheckChromeExtension.aboutUrl",
6052+
"label": "About URL",
6053+
"placeholder": "https://yourcompany.com/about",
6054+
"required": false
6055+
},
60296056
{
60306057
"type": "textField",
60316058
"name": "standards.DeployCheckChromeExtension.primaryColor",

0 commit comments

Comments
 (0)