From 4830aec138fd9323c023e7a2b5f8643cd550150f Mon Sep 17 00:00:00 2001 From: Kim Gardner Date: Mon, 20 Nov 2017 19:59:57 +0000 Subject: [PATCH 1/8] Update Report Bug link in Admin Settings --- client/coral-admin/src/components/ui/Header.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/coral-admin/src/components/ui/Header.js b/client/coral-admin/src/components/ui/Header.js index bd7fbcf0c..e199d5ded 100644 --- a/client/coral-admin/src/components/ui/Header.js +++ b/client/coral-admin/src/components/ui/Header.js @@ -87,7 +87,7 @@ const CoralHeader = ({ - + Report a bug or give feedback From 9629ba2f8399ffd779be80f683ca8548fc0ce235 Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Wed, 22 Nov 2017 14:48:34 -0700 Subject: [PATCH 2/8] added connector support --- graph/connectors.js | 83 +++++++++++++++++++++++++++++++++++++++++++++ graph/context.js | 4 +++ 2 files changed, 87 insertions(+) create mode 100644 graph/connectors.js diff --git a/graph/connectors.js b/graph/connectors.js new file mode 100644 index 000000000..ecaa79550 --- /dev/null +++ b/graph/connectors.js @@ -0,0 +1,83 @@ +// Errors. +const errors = require('../errors'); + +// Models. +const Action = require('../models/action'); +const Asset = require('../models/asset'); +const Comment = require('../models/comment'); +const Setting = require('../models/setting'); +const User = require('../models/user'); + +// Services. +const Actions = require('../services/actions'); +const Assets = require('../services/assets'); +const Cache = require('../services/cache'); +const Comments = require('../services/comments'); +const DomainList = require('../services/domainlist'); +const I18n = require('../services/i18n'); +const Jwt = require('../services/jwt'); +const Karma = require('../services/karma'); +const Kue = require('../services/kue'); +const Limit = require('../services/limit'); +const Locals = require('../services/locals'); +const Mailer = require('../services/mailer'); +const Metadata = require('../services/metadata'); +const Migration = require('../services/migration'); +const Mongoose = require('../services/mongoose'); +const Passport = require('../services/passport'); +const Plugins = require('../services/plugins'); +const Pubsub = require('../services/pubsub'); +const Redis = require('../services/redis'); +const Regex = require('../services/regex'); +const Scraper = require('../services/scraper'); +const Settings = require('../services/settings'); +const Setup = require('../services/setup'); +const Subscriptions = require('../services/subscriptions'); +const Tags = require('../services/tags'); +const Tokens = require('../services/tokens'); +const Users = require('../services/users'); +const Wordlist = require('../services/wordlist'); + +// Connector. +const connectors = { + errors, + models: { + Action, + Asset, + Comment, + Setting, + User, + }, + services: { + Actions, + Assets, + Cache, + Comments, + DomainList, + I18n, + Jwt, + Karma, + Kue, + Limit, + Locals, + Mailer, + Metadata, + Migration, + Mongoose, + Passport, + Plugins, + Pubsub, + Redis, + Regex, + Scraper, + Settings, + Setup, + Subscriptions, + Tags, + Tokens, + Users, + Wordlist, + }, +}; + +module.exports = connectors; diff --git a/graph/context.js b/graph/context.js index cd3f5ddbe..d6d85a651 100644 --- a/graph/context.js +++ b/graph/context.js @@ -2,6 +2,7 @@ const loaders = require('./loaders'); const mutators = require('./mutators'); const uuid = require('uuid'); const merge = require('lodash/merge'); +const connectors = require('./connectors'); const plugins = require('../services/plugins'); const pubsub = require('../services/pubsub'); @@ -51,6 +52,9 @@ class Context { this.user = user; } + // Attach the connectors. + this.connectors = connectors; + // Create the loaders. this.loaders = loaders(this); From 7f53375c67e0e99d24b8876d184f265a120a2ce7 Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Thu, 23 Nov 2017 13:40:19 +0100 Subject: [PATCH 3/8] More padding for question box --- client/talk-plugin-questionbox/QuestionBox.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/talk-plugin-questionbox/QuestionBox.css b/client/talk-plugin-questionbox/QuestionBox.css index cb9902ade..b8df1f228 100644 --- a/client/talk-plugin-questionbox/QuestionBox.css +++ b/client/talk-plugin-questionbox/QuestionBox.css @@ -13,6 +13,8 @@ min-height: 50px; display: flex; border-radius: 3px; + padding-right: 40px; + box-sizing: border-box; } .icon { @@ -67,4 +69,4 @@ .hidden { visibility: hidden; display: none; -} \ No newline at end of file +} From 9359bfc322a986f24b4cc7502bb5999246f0b765 Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Thu, 23 Nov 2017 20:09:16 +0100 Subject: [PATCH 4/8] Fix styling bug in firefox --- .../Configure/components/StreamSettings.css | 3 ++ .../Configure/components/StreamSettings.js | 34 ++++++++++--------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/client/coral-admin/src/routes/Configure/components/StreamSettings.css b/client/coral-admin/src/routes/Configure/components/StreamSettings.css index 5ddd46bd2..628192de6 100644 --- a/client/coral-admin/src/routes/Configure/components/StreamSettings.css +++ b/client/coral-admin/src/routes/Configure/components/StreamSettings.css @@ -53,3 +53,6 @@ +.autoCloseWrapper { + display: flex; +} diff --git a/client/coral-admin/src/routes/Configure/components/StreamSettings.js b/client/coral-admin/src/routes/Configure/components/StreamSettings.js index 9c05711cb..ffaeed63b 100644 --- a/client/coral-admin/src/routes/Configure/components/StreamSettings.js +++ b/client/coral-admin/src/routes/Configure/components/StreamSettings.js @@ -180,22 +180,24 @@ class StreamSettings extends React.Component { onCheckbox={this.updateAutoClose} title={t('configure.close_after')} > - -
- - - - - +
+ +
+ + + + + +
{/* the above card should be the last one if at all possible because of z-index issues with the selects */} From 37f3c1110420ebfa7685c4a2bd2c7ba7d12e1282 Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Fri, 24 Nov 2017 12:29:29 +0100 Subject: [PATCH 5/8] Fix radiogroup not working properly in ff --- .../src/routes/Stories/components/Stories.js | 4 ++-- yarn.lock | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/client/coral-admin/src/routes/Stories/components/Stories.js b/client/coral-admin/src/routes/Stories/components/Stories.js index 866defde4..933237ab9 100644 --- a/client/coral-admin/src/routes/Stories/components/Stories.js +++ b/client/coral-admin/src/routes/Stories/components/Stories.js @@ -48,7 +48,7 @@ class Stories extends Component {
{t('streams.filter_streams')}
{t('streams.stream_status')}
{t('streams.sort_by')}
Date: Fri, 24 Nov 2017 12:41:18 +0100 Subject: [PATCH 6/8] Sort by publication_date --- routes/api/assets/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/routes/api/assets/index.js b/routes/api/assets/index.js index 165b2cd99..d7cc86438 100644 --- a/routes/api/assets/index.js +++ b/routes/api/assets/index.js @@ -38,7 +38,7 @@ router.get('/', authorization.needed('ADMIN', 'MODERATOR'), async (req, res, nex const { value = '', - field = 'created_at', + field = 'publication_date', page = 1, asc = 'false', filter = 'all', @@ -46,9 +46,10 @@ router.get('/', authorization.needed('ADMIN', 'MODERATOR'), async (req, res, nex } = req.query; try { + const order = (asc === 'true') ? 1 : -1; const queryOpts = { - sort: {[field]: (asc === 'true') ? 1 : -1}, + sort: {[field]: order, 'created_at': order}, skip: (page - 1) * limit, limit }; From fb1dc23fa97bd863c1c4da31f110363080f7d05c Mon Sep 17 00:00:00 2001 From: Kim Gardner Date: Mon, 27 Nov 2017 16:28:46 +0000 Subject: [PATCH 7/8] Version 3.8.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 196effd71..63a1b7119 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "talk", - "version": "3.8.0", + "version": "3.8.1", "description": "A better commenting experience from Mozilla, The New York Times, and the Washington Post. https://coralproject.net", "main": "app.js", "private": true, From 417a7a3c369e76683781b43f304352307a07b49f Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Tue, 28 Nov 2017 09:16:33 -0700 Subject: [PATCH 8/8] added excemption as no fix available as of yet --- .nsprc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.nsprc b/.nsprc index 071431eff..583560bdd 100644 --- a/.nsprc +++ b/.nsprc @@ -1,5 +1,6 @@ { "exceptions": [ - "https://nodesecurity.io/advisories/531" + "https://nodesecurity.io/advisories/531", + "https://nodesecurity.io/advisories/532" ] -} \ No newline at end of file +}