Merge branch 'master' into profile-view-upd

This commit is contained in:
Youri 2019-06-04 15:42:41 -04:00 коммит произвёл GitHub
Родитель 8edbcb7071 b4193b75ec
Коммит 2b020871ab
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
6 изменённых файлов: 2603 добавлений и 4329 удалений

41
.snyk
Просмотреть файл

@ -1,41 +0,0 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.12.0
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
ignore:
'npm:shelljs:20140723':
- shx > shelljs:
reason: only used to run npm scripts
expires: '2018-12-31T00:00:00.000Z'
'npm:bootstrap:20160627':
- mofo-bootstrap > bootstrap:
reason: None given
expires: '2018-06-17T17:45:47.988Z'
'npm:hoek:20180212':
- node-sass > request > hawk > hoek:
reason: None given
expires: '2018-06-17T17:45:47.988Z'
- node-sass > request > hawk > boom > hoek:
reason: None given
expires: '2018-06-17T17:45:47.989Z'
- node-sass > request > hawk > sntp > hoek:
reason: None given
expires: '2018-06-17T17:45:47.989Z'
- node-sass > request > hawk > cryptiles > boom > hoek:
reason: None given
expires: '2018-06-17T17:45:47.989Z'
'npm:open:20180512':
- snyk > open:
reason: None given
expires: '2018-06-17T17:45:47.989Z'
'npm:stringstream:20180511':
- node-sass > request > stringstream:
reason: None given
expires: '2018-06-17T17:45:47.989Z'
- node-sass > node-gyp > request > stringstream:
reason: None given
expires: '2018-06-17T17:45:47.989Z'
'npm:tunnel-agent:20170305':
- node-sass > request > tunnel-agent:
reason: None given
expires: '2018-06-17T17:45:47.989Z'
patch: {}

Просмотреть файл

@ -13,12 +13,14 @@ export default {
],
fontSrc: [
`'self'`,
`https://code.cdn.mozilla.net`
`https://code.cdn.mozilla.net`,
`https://fonts.gstatic.com`
],
styleSrc: [
`'self'`,
`'unsafe-inline'`,
`https://code.cdn.mozilla.net`
`https://code.cdn.mozilla.net`,
`https://fonts.googleapis.com`
],
imgSrc: [
`'self'`,

6851
package-lock.json сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -22,7 +22,6 @@
"copy:contributejson": "shx cp contribute.json dist",
"copy:assets": "shx cp -r assets dist",
"server": "node dist/server.bundle.js",
"snyk-protect": "snyk protect",
"optimize": "run-p optimize:**",
"optimize:svg": "find assets -type f -name '*.svg' -print0 | xargs -0 -n 1 -P 6 svgo --multipass --pretty --enable=removeTitle",
"optimize:png": "find assets -type f -name '*.png' -print0 | xargs -0 -n 1 -P 6 optipng",
@ -31,8 +30,7 @@
"test": "run-s test:**",
"test:eslint": "eslint --config ./.eslintrc.json \"*.js\" \"*.jsx\" \"js/**/*.js\" \"components/**/*.jsx\" \"pages/**/*.jsx\" \"pages/**/*.js\" webpack.config.js",
"test:scss": "stylelint --config .stylelintrc \"components/**/*.scss\" \"pages/**/*.scss\" \"scss/**/*.scss\" --syntax scss",
"postinstall": "npm run build",
"prepare": "npm run snyk-protect"
"postinstall": "npm run build"
},
"babel": {
"presets": [
@ -102,13 +100,11 @@
"react-select": "^1.3.0",
"react-tag-autocomplete": "^5.11.0",
"shx": "^0.2.1",
"snyk": "^1.163.3",
"url": "^0.11.0",
"webpack": "^2.7.0"
},
"engines": {
"node": "^8.9.0",
"npm": "^6.0.0"
},
"snyk": true
}
}

Просмотреть файл

@ -9,13 +9,6 @@ import Service from "../../js/service.js";
import ProjectLoader from "../../components/project-loader/project-loader.jsx";
const DEFAULT_MODERATION_FILTER = `Pending`;
const TRENDING_TERMS = [
{ label: `mozsprint`, link: `/tags/mozsprint` },
{ label: `artists open web`, link: `/tags/Artists%20Open%20Web` },
{ label: `inclusion`, link: `/issues/digital-inclusion` },
{ label: `help code`, link: `/help/code` },
{ label: `help with feedback`, link: `/help/test-and-feedback` }
];
class Search extends React.Component {
constructor(props) {
@ -231,23 +224,6 @@ class Search extends React.Component {
return <div>{this.renderSearchBar()}</div>;
}
renderTrendingTerms() {
if (this.props.moderation || this.state.keywordSearched) return null;
let links = TRENDING_TERMS.map(term => (
<a href={term.link} className="btn btn-link inline-link" key={term.label}>
{term.label}
</a>
)).reduce((prev, curr) => [prev, `, `, curr]);
return (
<div className="trending">
<div className="d-inline-block mr-1">Trending:</div>
{links}
</div>
);
}
renderProjects() {
if (!this.state.keywordSearched && !this.props.moderation) return null;
@ -276,7 +252,6 @@ class Search extends React.Component {
<title>{this.state.keywordSearched}</title>
</Helmet>
{this.renderSearchControls()}
{this.renderTrendingTerms()}
{this.renderProjects()}
</div>
);

Просмотреть файл

@ -38,6 +38,7 @@ function renderPage(appHtml,reactHelmet) {
<link rel="shortcut icon" href="/assets/favicons/favicon.ico">
<link rel="manifest" href="/manifest.json">
<link rel="stylesheet" type="text/css" href="https://code.cdn.mozilla.net/fonts/zilla-slab.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito+Sans:400,300,700,300i">
<link rel="stylesheet" type="text/css" href="/css/mofo-bootstrap.css">
<link rel="stylesheet" type="text/css" href="/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="/css/main.css">