Browse Source

Add display of new third party cookies criterium (#39)

main
Marian Steinbach 3 years ago committed by GitHub
parent
commit
d6f0ffc4fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/SearchResultItem.js
  2. 17
      src/SiteDetailsPage.js

2
src/SearchResultItem.js

@ -21,7 +21,7 @@ class SearchResultItem extends Component {
<URLField url={this.props.site._source.url} link={false} />
</div>
<div className='col-3 col-sm-2 col-md-2 d-flex'>
<ScoreField score={this.props.site._source.score} maxScore={15} />
<ScoreField score={this.props.site._source.score} maxScore={16} />
</div>
</div>
</Link>

17
src/SiteDetailsPage.js

@ -114,6 +114,11 @@ class SiteDetailsPage extends Component {
component: <FeedField key='feed' data={this.state.site.rating.FEEDS} />,
data: this.state.site.rating.FEEDS,
},
{
criterium: 'NO_THIRD_PARTY_COOKIES',
component: <CookiesField key='cookies' data={this.state.site.rating.NO_THIRD_PARTY_COOKIES} />,
data: this.state.site.rating.NO_THIRD_PARTY_COOKIES,
},
{
criterium: 'NO_SCRIPT_ERRORS',
component: <ScriptErrorsField key='scripterrors' data={this.state.site.rating.NO_SCRIPT_ERRORS} />,
@ -183,7 +188,7 @@ class SiteDetailsPage extends Component {
<hr />
<ScoreComparisonWidget sitesCount={this.props.sitesCount} thisSite={this.state.site} maxScore={15} />
<ScoreComparisonWidget sitesCount={this.props.sitesCount} thisSite={this.state.site} maxScore={16} />
{
this.state.site.rating.SITE_REACHABLE.value ?
@ -364,6 +369,15 @@ class FeedField extends Component {
}
}
class CookiesField extends Component {
render() {
if (this.props.data.value) {
return <CriteriumField keyProp='feed' type='positive' title='Es werden keine Third Party Cookies gesetzt' />;
}
return <CriteriumField keyProp='feed' type='negative' title='Beim Laden der Site werden Third Party Cookies gesetzt' />;
}
}
class FontField extends Component {
render() {
let font = 'Arvo';
@ -460,7 +474,6 @@ class Screenshots extends Component {
axios.get(`/api/v1/screenshots/site?url=${encodeURIComponent(url)}`)
.then((response) => {
console.debug(response.data);
// Success
let screenshots = null;

Loading…
Cancel
Save