diff --git a/.eslintignore b/.eslintignore index fc0d50a25..cd0c80673 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,7 +1,13 @@ dist +docs client/lib **/*.html plugins/* !plugins/coral-plugin-facebook-auth +!plugins/coral-plugin-auth !plugins/coral-plugin-respect +!plugins/coral-plugin-offtopic +!plugins/coral-plugin-like +!plugins/coral-plugin-mod +!plugins/coral-plugin-love node_modules diff --git a/.gitignore b/.gitignore index f0c3b2a4b..11e738d57 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ coverage/ plugins.json plugins/* !plugins/coral-plugin-facebook-auth +!plugins/coral-plugin-auth !plugins/coral-plugin-respect !plugins/coral-plugin-offtopic !plugins/coral-plugin-like diff --git a/README.md b/README.md index 718847d9e..a514d1ee1 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,6 @@ To set up a development environment or build from source, see [INSTALL.md](https To launch a Talk server of your own from your browser without any need to muck about in a terminal or think about engineering concepts, stay tuned. We will launch [our installer](https://github.com/coralproject/talk-install) shortly! - ### Configuration The Talk application looks for the following configuration values either as environment variables: @@ -45,6 +44,10 @@ sign and verify tokens via a `HS256` algorithm. Refer to the wiki page on [Configuration Loading](https://github.com/coralproject/talk/wiki/Configuration-Loading) for alternative methods of loading configuration during development. +## Plugins + +Talk ships with a plugin architecture that allows developers to significantly extend the platform. For more information, see our [plugin documentation](docs/PLUGINS.md). + ## Supported Browsers ### Web @@ -58,6 +61,8 @@ alternative methods of loading configuration during development. - iPad - iPad Pro +- iPhone 7 Plus +- iPhone 7 - iPhone 6 Plus - iPhone 6 - iPhone 5 diff --git a/app.js b/app.js index 16840f965..d0f0f316b 100644 --- a/app.js +++ b/app.js @@ -11,6 +11,8 @@ const errors = require('./errors'); const {createGraphOptions} = require('./graph'); const apollo = require('graphql-server-express'); const accepts = require('accepts'); +const compression = require('compression'); +const cookieParser = require('cookie-parser'); const app = express(); @@ -31,6 +33,8 @@ app.set('trust proxy', 1); app.use(helmet({ frameguard: false })); +app.use(compression()); +app.use(cookieParser()); app.use(bodyParser.json()); //============================================================================== diff --git a/client/coral-admin/src/actions/assets.js b/client/coral-admin/src/actions/assets.js index f5c2f848a..8a18a8e3f 100644 --- a/client/coral-admin/src/actions/assets.js +++ b/client/coral-admin/src/actions/assets.js @@ -8,7 +8,7 @@ import { UPDATE_ASSETS } from '../constants/assets'; -import coralApi from '../../../coral-framework/helpers/response'; +import coralApi from '../../../coral-framework/helpers/request'; /** * Action disptacher related to assets diff --git a/client/coral-admin/src/actions/auth.js b/client/coral-admin/src/actions/auth.js index 29971e294..ca48764f1 100644 --- a/client/coral-admin/src/actions/auth.js +++ b/client/coral-admin/src/actions/auth.js @@ -1,6 +1,7 @@ +import bowser from 'bowser'; import * as actions from '../constants/auth'; +import coralApi from 'coral-framework/helpers/request'; import * as Storage from 'coral-framework/helpers/storage'; -import coralApi from 'coral-framework/helpers/response'; import {handleAuthToken} from 'coral-framework/actions/auth'; //============================================================================== @@ -9,16 +10,31 @@ import {handleAuthToken} from 'coral-framework/actions/auth'; export const handleLogin = (email, password, recaptchaResponse) => (dispatch) => { dispatch({type: actions.LOGIN_REQUEST}); - const params = {method: 'POST', body: {email, password}}; + + const params = { + method: 'POST', + body: { + email, + password + } + }; + if (recaptchaResponse) { - params.headers = {'X-Recaptcha-Response': recaptchaResponse}; + params.headers = { + 'X-Recaptcha-Response': recaptchaResponse + }; } + return coralApi('/auth/local', params) .then(({user, token}) => { + if (!user) { - Storage.removeItem('token'); + if (!bowser.safari && !bowser.ios) { + Storage.removeItem('token'); + } return dispatch(checkLoginFailure('not logged in')); } + dispatch(handleAuthToken(token)); dispatch(checkLoginSuccess(user)); }) @@ -52,7 +68,9 @@ const forgotPassowordFailure = () => ({ export const requestPasswordReset = (email) => (dispatch) => { dispatch(forgotPassowordRequest(email)); - return coralApi('/account/password/reset', {method: 'POST', body: {email}}) + const redirectUri = location.href; + + return coralApi('/account/password/reset', {method: 'POST', body: {email, loc: redirectUri}}) .then(() => dispatch(forgotPassowordSuccess())) .catch((error) => dispatch(forgotPassowordFailure(error))); }; @@ -81,7 +99,9 @@ export const checkLogin = () => (dispatch) => { return coralApi('/auth') .then(({user}) => { if (!user) { - Storage.removeItem('token'); + if (!bowser.safari && !bowser.ios) { + Storage.removeItem('token'); + } return dispatch(checkLoginFailure('not logged in')); } diff --git a/client/coral-admin/src/actions/community.js b/client/coral-admin/src/actions/community.js index 9a8743762..36b9ffb0a 100644 --- a/client/coral-admin/src/actions/community.js +++ b/client/coral-admin/src/actions/community.js @@ -14,7 +14,7 @@ import { HIDE_SUSPENDUSER_DIALOG } from '../constants/community'; -import coralApi from '../../../coral-framework/helpers/response'; +import coralApi from '../../../coral-framework/helpers/request'; export const fetchAccounts = (query = {}) => (dispatch) => { diff --git a/client/coral-admin/src/actions/install.js b/client/coral-admin/src/actions/install.js index 21ff58de1..15413e220 100644 --- a/client/coral-admin/src/actions/install.js +++ b/client/coral-admin/src/actions/install.js @@ -1,4 +1,4 @@ -import coralApi from 'coral-framework/helpers/response'; +import coralApi from 'coral-framework/helpers/request'; import * as actions from '../constants/install'; import validate from 'coral-framework/helpers/validate'; import errorMsj from 'coral-framework/helpers/error'; diff --git a/client/coral-admin/src/actions/settings.js b/client/coral-admin/src/actions/settings.js index b0530e77e..65c200420 100644 --- a/client/coral-admin/src/actions/settings.js +++ b/client/coral-admin/src/actions/settings.js @@ -1,4 +1,4 @@ -import coralApi from '../../../coral-framework/helpers/response'; +import coralApi from '../../../coral-framework/helpers/request'; export const SETTINGS_LOADING = 'SETTINGS_LOADING'; export const SETTINGS_RECEIVED = 'SETTINGS_RECEIVED'; diff --git a/client/coral-admin/src/actions/users.js b/client/coral-admin/src/actions/users.js index 2642db90d..e888d5b74 100644 --- a/client/coral-admin/src/actions/users.js +++ b/client/coral-admin/src/actions/users.js @@ -1,4 +1,4 @@ -import coralApi from '../../../coral-framework/helpers/response'; +import coralApi from '../../../coral-framework/helpers/request'; import * as userTypes from '../constants/users'; /** diff --git a/client/coral-admin/src/components/ui/Header.css b/client/coral-admin/src/components/ui/Header.css index eba94d892..7cb68ecbf 100644 --- a/client/coral-admin/src/components/ui/Header.css +++ b/client/coral-admin/src/components/ui/Header.css @@ -73,6 +73,8 @@ font-weight: 500; background-color: transparent; transition: background-color 200ms; + font-weight: 100; + letter-spacing: .8; &:hover { background-color: #232323; @@ -80,6 +82,7 @@ &.active { background-color: #232323; + font-weight: 400; } } diff --git a/client/coral-admin/src/containers/ModerationQueue/components/CommentCount.css b/client/coral-admin/src/containers/ModerationQueue/components/CommentCount.css index 6ca30866a..b684d0f4a 100644 --- a/client/coral-admin/src/containers/ModerationQueue/components/CommentCount.css +++ b/client/coral-admin/src/containers/ModerationQueue/components/CommentCount.css @@ -3,12 +3,13 @@ background: #989797; margin: 2px; vertical-align: middle; - padding: 4px 7px; + padding: 1px 7px; border-radius: 2px; - margin-left: 10px; + margin-left: 2px; line-height: 20px; box-sizing: border-box; - height: 27px; + height: 21px; right: 0; margin-top: -2px; + font-size: 12px; } diff --git a/client/coral-admin/src/containers/ModerationQueue/components/ModerationHeader.js b/client/coral-admin/src/containers/ModerationQueue/components/ModerationHeader.js index cbe8b8cbf..c6909226b 100644 --- a/client/coral-admin/src/containers/ModerationQueue/components/ModerationHeader.js +++ b/client/coral-admin/src/containers/ModerationQueue/components/ModerationHeader.js @@ -11,7 +11,7 @@ const ModerationHeader = (props) => ( props.asset ?
{asset.settings.closedMessage}
} - {!loggedIn && - } {loggedIn && - user && -The following pages and posts are tagged with
+| Title | Type | Excerpt |
|---|---|---|
| {{page.title}} | +Page | +{% if page.summary %} {{ page.summary | strip_html | strip_newlines | truncate: 160 }} {% else %} {{ page.content | truncatewords: 50 | strip_html }} {% endif %} | +
| {{post.title}} | +Post | +{% if post.summary %} {{ post.summary | strip_html | strip_newlines | truncate: 160 }} {% else %} {{ post.content | truncatewords: 50 | strip_html }} {% endif %} | +
+{
+ "apples": "red fruit at the store",
+ "bananas": "yellow bananas in a bunch",
+ "carrots": "orange vegetables that grow in the ground",
+ "dingbats": "a type of character symbol on a computer",
+ "eggs": "chickens lay them, and people eat them",
+ "falafel": "a Mediterranean sandwich consisting of lots of different stuff i don't know much about",
+ "giraffe": "tall animal, has purple tongue",
+ "hippo": "surprisingly dangerous amphibian",
+ "igloo": "an ice shelter made by eskimos",
+ "jeep: "the only car that starts with a j",
+ "kilt": "something worn by scottish people, not a dress",
+ "lamp": "you use it to read by your bedside at night"
+ "manifold": "an intake mechanism on a car, like a valve, i think",
+ "octopus": "eight tentacles, shoots ink, lives in dark caves, very mysterious",
+ "paranoia": "the constant feeling that others are out to get you, conspiring against your success",
+ "qui": "a life force that runs through your body",
+ "radical": "someone who opposes the status quo in major ways",
+ "silly": "how I feel writing this dummy copy",
+ "taffy": "the sweets children like the most and dentists hate the worst",
+ "umbrella": "an invention that has not had any advancements in 200 years",
+ "vampire": "a paranormal figure that is surprisingly in vogue despite its basic nature",
+ "washington": "the place where tom was born",
+ "xylophone": "some kind of pinging instrument used to sound chime-like notes",
+ "yahoo": "an expression of exuberance, said under breath when something works right",
+ "zeta": "the way british people pronounce z",
+ "alpha": "the original letter of the alphabet, which has since come to mean the first. however, i think the original symbol of alpha is actually an ox. it is somewhat of a mystery to linquists as to the exact origin of the letter alpha, but it basically represents the dawn of the alphabet, which proved to be a huge step forward for human thought and expression.",
+ "beta": "the period of time when something is finished but undergoing testing by a group of people.",
+ "cappa": "how italians refer to their baseball caps",
+ "dunno": "informal expression for 'don't know'"
+ }
+
+
+
+{t('sign_in.verify_email')}
{t('sign_in.verify_email2')}
+ {t('sign_in.verify_email')}
+
+
+ {t('sign_in.verify_email2')}
+