diff --git a/frontend/src/components/ScanBlocks.js b/frontend/src/components/ScanBlocks.js index 12341a9..9dd7683 100644 --- a/frontend/src/components/ScanBlocks.js +++ b/frontend/src/components/ScanBlocks.js @@ -12,7 +12,7 @@ import FiltersBlock from './FiltersBlock'; const ScanBlocks = () => ( <> - + {/* */} {/* */} {/* diff --git a/frontend/src/components/TableRow.js b/frontend/src/components/TableRow.js index 9653f7f..5852c89 100644 --- a/frontend/src/components/TableRow.js +++ b/frontend/src/components/TableRow.js @@ -29,7 +29,9 @@ const TableRow = ({ item }) => { {item.title} {item.value} - {parse(item.issues || '')} + {item.issues.map((ele) => ( +
{ele}
+ ))} {parse(workerData)} diff --git a/frontend/src/components/main.js b/frontend/src/components/main.js index 692fa8f..124ecbb 100644 --- a/frontend/src/components/main.js +++ b/frontend/src/components/main.js @@ -1,3 +1,4 @@ +/* eslint-disable no-unused-vars */ /* eslint-disable dot-notation */ export { getNavigator, @@ -109,7 +110,12 @@ const getWidth = () => ({ key: 'width', title: 'Width', value: window.screen.width, - issues: checkScreenProperties('width') + checkWidth(), + issues: [ + checkScreenProperties('width'), + checkScreenValue('width'), + checkScreenPrototype('width'), + checkWidth(), + ], }); const getOuterWidth = () => ({ @@ -182,13 +188,13 @@ const getNavigator = () => [ const getScreen = () => [ getWidth(), - getAvailWidth(), - getOuterWidth(), - getHeight(), - getAvailHeight(), - getOuterHeight(), - getPixelDepth(), - getColorDepth(), + // getAvailWidth(), + // getOuterWidth(), + // getHeight(), + // getAvailHeight(), + // getOuterHeight(), + // getPixelDepth(), + // getColorDepth(), ]; // sorts plugins object into comma separated list @@ -225,26 +231,54 @@ const checkNavigatorProperties = (key) => { return list.toString().split(',').join('
'); }; +// const checkScreenProperties = (key) => { +// const list = []; +// if (Object.getOwnPropertyDescriptor(window.screen, key) !== undefined) { +// list.push('Failed undefined properties'); +// } +// if ( +// Object.getOwnPropertyDescriptor(Screen.prototype, key).value !== undefined +// ) { +// list.push('Failed descriptor.value undefined'); +// } +// try { +// // eslint-disable-next-line no-unused-vars +// const check = Screen.prototype[key]; +// list.push('Failed Navigator.prototype'); +// } catch (err) { +// // eslint-disable-next-line no-unused-vars +// const check = ''; +// } + +// return list.toString().split(',').join('
'); +// }; + const checkScreenProperties = (key) => { - const list = []; if (Object.getOwnPropertyDescriptor(window.screen, key) !== undefined) { - list.push('Failed undefined properties'); + return 'Failed undefined properties'; } + return null; +}; + +const checkScreenValue = (key) => { if ( Object.getOwnPropertyDescriptor(Screen.prototype, key).value !== undefined ) { - list.push('Failed descriptor.value undefined'); + return 'Failed descriptor.value undefined'; } + return null; +}; + +const checkScreenPrototype = (key) => { try { // eslint-disable-next-line no-unused-vars const check = Screen.prototype[key]; - list.push('Failed Navigator.prototype'); + return 'Failed Navigator.prototype'; } catch (err) { // eslint-disable-next-line no-unused-vars const check = ''; } - - return list.toString().split(',').join('
'); + return null; }; // const checkWindowProperties = (key) => { @@ -268,7 +302,7 @@ const checkScreenProperties = (key) => { const checkWidth = () => { if (window.screen.availWidth > window.screen.width) { - return '
Avail width is wider then width'; + return 'Avail width is wider then width'; } return ''; }; diff --git a/frontend/src/styles/App.css b/frontend/src/styles/App.css index 0d9b93d..d153256 100644 --- a/frontend/src/styles/App.css +++ b/frontend/src/styles/App.css @@ -213,6 +213,10 @@ input[type='text'] { border: 1px solid var(--issueBorder); } +.newline { + display: block; +} + @media screen and (max-width: 500px) { .github { width: 24px;