+
);
};
diff --git a/client/coral-admin/src/containers/Community/Table.js b/client/coral-admin/src/containers/Community/Table.js
index 1d81b1b2e..c146e564a 100644
--- a/client/coral-admin/src/containers/Community/Table.js
+++ b/client/coral-admin/src/containers/Community/Table.js
@@ -52,6 +52,7 @@ class Table extends Component {
this.onCommenterStatusChange(row.id, status)}>
@@ -60,6 +61,7 @@ class Table extends Component {
|
this.onRoleChange(row.id, role)}>
diff --git a/client/coral-admin/src/containers/Configure/CommentSettings.js b/client/coral-admin/src/containers/Configure/CommentSettings.js
index 6000c1d43..9fb3d75da 100644
--- a/client/coral-admin/src/containers/Configure/CommentSettings.js
+++ b/client/coral-admin/src/containers/Configure/CommentSettings.js
@@ -3,15 +3,8 @@ import {SelectField, Option} from 'react-mdl-selectfield';
import I18n from 'coral-framework/modules/i18n/i18n';
import translations from '../../translations.json';
import styles from './Configure.css';
-import {
- List,
- ListItem,
- ListItemContent,
- ListItemAction,
- Textfield,
- Checkbox,
- Icon
-} from 'react-mdl';
+import {Textfield, Checkbox} from 'react-mdl';
+import {Card, Icon, Spinner} from 'coral-ui';
const TIMESTAMPS = {
weeks: 60 * 60 * 24 * 7,
@@ -71,35 +64,32 @@ const updateClosedTimeout = (updateSettings, ts, isMeasure) => (event) => {
const CommentSettings = ({fetchingSettings, title, updateSettings, settingsError, settings, errors}) => {
if (fetchingSettings) {
-
- /* maybe a spinner here at some point */
- return Loading settings... ;
+ return Loading settings...;
}
return (
-
+
{title}
-
-
-
+
+
-
-
+
+
{lang.t('configure.enable-pre-moderation')}
{lang.t('configure.enable-pre-moderation-text')}
-
-
-
-
+
+
+
+
-
-
+
+
{lang.t('configure.comment-count-header')}
{lang.t('configure.comment-count-text-pre')}
@@ -118,32 +108,44 @@ const CommentSettings = ({fetchingSettings, title, updateSettings, settingsError
}
-
-
-
-
+
+
+
+
-
-
+
+
{lang.t('configure.include-comment-stream')}
{lang.t('configure.include-comment-stream-desc')}
-
-
-
-
+
+
+
+
+
+ {lang.t('configure.closed-comments-desc')}
+
-
-
-
-
+
+
+
+
+
{lang.t('configure.close-after')}
{lang.t('configure.weeks')}
-
-
-
-
- {lang.t('configure.closed-comments-desc')}
-
-
-
-
+
+
);
};
diff --git a/client/coral-admin/src/containers/Configure/Configure.css b/client/coral-admin/src/containers/Configure/Configure.css
index 2b5c8d578..1f23af30b 100644
--- a/client/coral-admin/src/containers/Configure/Configure.css
+++ b/client/coral-admin/src/containers/Configure/Configure.css
@@ -1,26 +1,29 @@
.container {
- padding: 10px;
display: flex;
+
+ h3 {
+ color: black;
+ font-size: 1.76em;
+ font-weight: 500;
+ }
}
.leftColumn {
- width: 300px;
+ padding: 42px 56px;
+ width: 234px;
}
.mainContent {
- width: calc(70% - 300px)
-}
-
-.settingOption {
- cursor: pointer;
+ width: calc(100% - 300px);
+ padding: 10px 14px;
+ box-sizing: border-box;
+ max-width: 718px;
}
.configSetting {
- border: 1px solid #ccc;
- border-radius: 4px;
- height: 95px;
- margin-bottom: 10px;
+ margin-bottom: 20px;
align-items: flex-start;
+ min-height: 100px;
}
.settingsError {
@@ -42,13 +45,13 @@
}
.configSettingInfoBox {
- border: 1px solid #ccc;
- border-radius: 4px;
- margin-bottom: 10px;
+ min-height: 100px;
+ margin-bottom: 20px;
cursor: pointer;
width: auto;
height: auto;
text-align: left;
+ overflow: visible;
}
.configSettingInfoBox p {
@@ -77,7 +80,7 @@
}
.charCountTexfieldEnabled {
- border-color: #4caf50;
+ border-color: #00796b;
}
.charCountTexfield:focus {
@@ -85,11 +88,12 @@
}
.changedSave {
- background-color:#4caf50;
+ background-color: #00796B;
+ color: white;
}
.copiedText {
- color: #008000;
+ color: #00796b;
float: right;
padding: 12px;
font-size: 14px;
@@ -97,6 +101,7 @@
.copyButton {
float: right;
+ width: 200px;
}
.embedInput {
@@ -113,8 +118,12 @@
}
#bannedWordlist, #suspectWordlist {
+ width: 100%;
+ padding: 10px;
+
+ input {
width: 100%;
- padding: 10px;
+ }
}
.wordlistHeader {
@@ -124,7 +133,7 @@
}
.enabledSetting {
- border-left-color: #4caf50;
+ border-left-color: #00796b;
border-left-style: solid;
border-left-width: 7px;
}
@@ -136,3 +145,23 @@
.hidden {
display: none;
}
+
+.saveBox {
+ margin-top: 38px;
+}
+
+.commentSettingsSection {
+ padding-bottom: 200px;
+ .action {
+ display: inline-block;
+ position: absolute;
+ top: 0;
+ left: 0;
+ padding: 20px;
+ }
+
+ .content {
+ display: inline-block;
+ padding-left: 30px;
+ }
+}
diff --git a/client/coral-admin/src/containers/Configure/Configure.js b/client/coral-admin/src/containers/Configure/Configure.js
index 9fc24ad53..8ad6cacfd 100644
--- a/client/coral-admin/src/containers/Configure/Configure.js
+++ b/client/coral-admin/src/containers/Configure/Configure.js
@@ -1,4 +1,4 @@
-import React from 'react';
+import React, {Component} from 'react';
import {connect} from 'react-redux';
import {
fetchSettings,
@@ -6,13 +6,8 @@ import {
saveSettingsToServer,
updateWordlist,
} from '../../actions/settings';
-import {
- List,
- ListItem,
- ListItemContent,
- Button,
- Icon
-} from 'react-mdl';
+
+import {Button, List, Item} from 'coral-ui';
import styles from './Configure.css';
import I18n from 'coral-framework/modules/i18n/i18n';
import translations from '../../translations.json';
@@ -21,7 +16,7 @@ import CommentSettings from './CommentSettings';
import Wordlist from './Wordlist';
import has from 'lodash/has';
-class Configure extends React.Component {
+class Configure extends Component {
constructor (props) {
super(props);
@@ -30,6 +25,8 @@ class Configure extends React.Component {
changed: false,
errors: {}
};
+
+ this.changeSection = this.changeSection.bind(this);
}
componentWillMount = () => {
@@ -41,7 +38,7 @@ class Configure extends React.Component {
this.setState({changed: false});
}
- changeSection = (activeSection) => () => {
+ changeSection(activeSection) {
this.setState({activeSection});
}
@@ -99,7 +96,8 @@ class Configure extends React.Component {
}
render () {
- const section = this.getSection(this.state.activeSection);
+ const {activeSection} = this.state;
+ const section = this.getSection(activeSection);
const showSave = Object.keys(this.state.errors).reduce(
(bool, error) => this.state.errors[error] ? false : bool, this.state.changed);
@@ -107,37 +105,40 @@ class Configure extends React.Component {
return (
-
-
- {lang.t('configure.comment-settings')}
-
-
- {lang.t('configure.embed-comment-stream')}
-
-
- {lang.t('configure.wordlist')}
-
+
+ -
+ {lang.t('configure.comment-settings')}
+
+ -
+ {lang.t('configure.embed-comment-stream')}
+
+ -
+ {lang.t('configure.wordlist')}
+
+
{
showSave ?
-
- :
+
+ :
+
}
+
diff --git a/client/coral-admin/src/containers/Configure/EmbedLink.js b/client/coral-admin/src/containers/Configure/EmbedLink.js
index 374d78ea3..105b531c5 100644
--- a/client/coral-admin/src/containers/Configure/EmbedLink.js
+++ b/client/coral-admin/src/containers/Configure/EmbedLink.js
@@ -2,11 +2,7 @@ import React, {Component} from 'react';
import I18n from 'coral-framework/modules/i18n/i18n';
import translations from '../../translations.json';
import styles from './Configure.css';
-import {
- List,
- ListItem,
- Button
-} from 'react-mdl';
+import {Button, Card} from 'coral-ui';
class EmbedLink extends Component {
@@ -34,16 +30,16 @@ class EmbedLink extends Component {
return (
{this.props.title}
-
-
+
+
{lang.t('configure.copy-and-paste')}
+
);
}
diff --git a/client/coral-admin/src/containers/Configure/Wordlist.js b/client/coral-admin/src/containers/Configure/Wordlist.js
index 595b5ea42..1a808acc6 100644
--- a/client/coral-admin/src/containers/Configure/Wordlist.js
+++ b/client/coral-admin/src/containers/Configure/Wordlist.js
@@ -2,15 +2,13 @@ import React from 'react';
import I18n from 'coral-framework/modules/i18n/i18n';
import translations from '../../translations.json';
import TagsInput from 'react-tagsinput';
-
import styles from './Configure.css';
-
-import {Card} from 'react-mdl';
+import {Card} from 'coral-ui';
const Wordlist = ({suspectWords, bannedWords, onChangeWordlist}) => (
{lang.t('configure.banned-words-title')}
-
+
{lang.t('configure.banned-word-header')}
{lang.t('configure.banned-word-text')}
(
inputProps={{placeholder: 'word or phrase'}}
addOnPaste={true}
pasteSplit={data => data.split(',').map(d => d.trim())}
- onChange={tags => onChangeWordlist('banned', tags)} />
+ onChange={tags => onChangeWordlist('banned', tags)}
+ />
{lang.t('configure.suspect-words-title')}
-
+
{lang.t('configure.suspect-word-header')}
{lang.t('configure.suspect-word-text')}
span {
+ color: white;
+}
+
+.active:after {
+ background: transparent !important;
}
.showShortcuts {
diff --git a/client/coral-admin/src/containers/ModerationQueue/ModerationQueue.js b/client/coral-admin/src/containers/ModerationQueue/ModerationQueue.js
index 6121ca307..11b6389e3 100644
--- a/client/coral-admin/src/containers/ModerationQueue/ModerationQueue.js
+++ b/client/coral-admin/src/containers/ModerationQueue/ModerationQueue.js
@@ -12,14 +12,35 @@ const lang = new I18n(translations);
export default ({onTabClick, ...props}) => (
-
+
{
diff --git a/client/coral-admin/src/containers/Streams/Streams.css b/client/coral-admin/src/containers/Streams/Streams.css
index c64de7974..26fb4f74f 100644
--- a/client/coral-admin/src/containers/Streams/Streams.css
+++ b/client/coral-admin/src/containers/Streams/Streams.css
@@ -4,11 +4,14 @@
}
.leftColumn {
- width: 200px;
+ padding: 42px 56px;
+ width: 234px;
}
.mainContent {
- width: calc(90% - 200px);
+ width: calc(100% - 300px);
+ padding: 34px 14px;
+ box-sizing: border-box;
}
.searchIcon {
@@ -18,11 +21,12 @@
}
.searchBox {
- padding: 3px;
+ width: 100%;
+ padding: 9px;
border: 1px solid #ccc;
- border-radius: 3px;
- width: 90%;
+ border-radius: 2px;
display: flex;
+ background: white;
}
.searchBoxInput {
@@ -48,6 +52,16 @@
.streamsTable {
width: 100%;
+ border-left: none;
+ border-right: none;
+
+ th {
+ font-size: 1.1em;
+ }
+
+ th.status {
+ width: 100px;
+ }
}
.radio {
@@ -55,18 +69,20 @@
}
.statusMenu {
- border-radius: 3px;
+ border-radius: 2px;
width: 10em;
text-align: center;
float: right;
- border: 1px solid #ccc;
color: #fff;
cursor: pointer;
+ letter-spacing: 0.7px;
+ font-weight: 400;
+ box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.2), 0 1px 5px 0 rgba(0,0,0,.12);
}
.statusMenuOpen {
padding: 10px;
- background-color: #4caf50;
+ background-color: #268D81;
}
.statusMenuIcon {
@@ -75,9 +91,17 @@
.statusMenuClosed {
padding: 10px;
- background-color: #000;
+ background-color: #262626;
}
.hidden {
display: none;
}
+
+.radioGroup {
+ margin-top: 5px;
+ span {
+ margin-bottom: 7px;
+ display: inline-block;
+ }
+}
diff --git a/client/coral-admin/src/containers/Streams/Streams.js b/client/coral-admin/src/containers/Streams/Streams.js
index a154516dd..3c4b143b8 100644
--- a/client/coral-admin/src/containers/Streams/Streams.js
+++ b/client/coral-admin/src/containers/Streams/Streams.js
@@ -103,61 +103,63 @@ class Streams extends Component {
render () {
const {search, sort, filter} = this.state;
const {assets} = this.props;
-
- return
-
-
-
-
-
-
-
- {lang.t('streams.filter-streams')}
- {lang.t('streams.stream-status')}
+ return (
+
+
+
+
+
+
+ {lang.t('streams.filter-streams')}
+ {lang.t('streams.stream-status')}
+ onChange={this.onSettingChange('filter')}
+ className={styles.radioGroup}
+ >
{lang.t('streams.all')}
{lang.t('streams.open')}
{lang.t('streams.closed')}
{lang.t('streams.sort-by')}
-
- {lang.t('streams.newest')}
- {lang.t('streams.oldest')}
-
+
+ {lang.t('streams.newest')}
+ {lang.t('streams.oldest')}
+
+
+
+ assets.byId[id])}>
+ {lang.t('streams.article')}
+
+ {lang.t('streams.pubdate')}
+
+
+ {lang.t('streams.status')}
+
+
+
+
-
-
- assets.byId[id])}>
- {lang.t('streams.article')}
-
- {lang.t('streams.pubdate')}
-
-
- {lang.t('streams.status')}
-
-
-
-
- ;
+ );
}
}
diff --git a/client/coral-admin/src/translations.json b/client/coral-admin/src/translations.json
index 0fbd1e7b9..3718732fe 100644
--- a/client/coral-admin/src/translations.json
+++ b/client/coral-admin/src/translations.json
@@ -46,13 +46,13 @@
"include-comment-stream": "Include Comment Stream Description for Readers.",
"include-comment-stream-desc": "Write a message to be added to the top of your comment stream. Pose a topic, include community guidelines, etc.",
"include-text": "Include your text here.",
- "comment-settings": "Comment Settings",
- "embed-comment-stream": "Embed Comment Stream",
+ "comment-settings": "Settings",
+ "embed-comment-stream": "Embed Stream",
"banned-word-header": "Write the banned words list",
"suspect-word-header": "Write the suspect words list",
"banned-word-text": "Comments which contain these words or phrases (not case-sensitive) will be automatically removed from the comment stream. Type a word and press Enter or Tab to add. Optionally paste a comma-separated list.",
"suspect-word-text": "Comments which contain these words or phrases (not case-sensitive) will be highlighted in the comment stream. Type a word and press Enter or Tab to add. Optionally paste a comma-separated list.",
- "wordlist": "Banned & Suspect Words",
+ "wordlist": "Banned Words",
"banned-words-title": "Banned words list",
"suspect-words-title": "Suspect words list",
"save-changes": "Save Changes",
diff --git a/client/coral-embed-stream/src/CommentStream.js b/client/coral-embed-stream/src/CommentStream.js
index 5ad82f1ad..c46785ec6 100644
--- a/client/coral-embed-stream/src/CommentStream.js
+++ b/client/coral-embed-stream/src/CommentStream.js
@@ -1,17 +1,19 @@
import React, {Component, PropTypes} from 'react';
import Pym from 'pym.js';
import {graphql} from 'react-apollo';
+import {connect} from 'react-redux';
import gql from 'graphql-tag';
import {
- // itemActions,
+ itemActions,
+
// Notification,
- // notificationActions,
+ notificationActions,
authActions
} from '../../coral-framework';
-// import CommentBox from '../../coral-plugin-commentbox/CommentBox';
-// import InfoBox from '../../coral-plugin-infobox/InfoBox';
+import CommentBox from '../../coral-plugin-commentbox/CommentBox';
+import InfoBox from '../../coral-plugin-infobox/InfoBox';
import Content from '../../coral-plugin-commentcontent/CommentContent';
import PubDate from '../../coral-plugin-pubdate/PubDate';
import Count from '../../coral-plugin-comment-count/CommentCount';
@@ -21,22 +23,22 @@ import FlagComment from '../../coral-plugin-flags/FlagComment';
import LikeButton from '../../coral-plugin-likes/LikeButton';
import PermalinkButton from '../../coral-plugin-permalinks/PermalinkButton';
-// import SignInContainer from '../../coral-sign-in/containers/SignInContainer';
-// import UserBox from '../../coral-sign-in/components/UserBox';
+import SignInContainer from '../../coral-sign-in/containers/SignInContainer';
+import UserBox from '../../coral-sign-in/components/UserBox';
import {TabBar, Tab, TabContent, Spinner} from '../../coral-ui';
// import SettingsContainer from '../../coral-settings/containers/SettingsContainer';
-// import RestrictedContent from '../../coral-framework/components/RestrictedContent';
-// import SuspendedAccount from '../../coral-framework/components/SuspendedAccount';
+import RestrictedContent from '../../coral-framework/components/RestrictedContent';
+import SuspendedAccount from '../../coral-framework/components/SuspendedAccount';
// import ConfigureStreamContainer from '../../coral-configure/containers/ConfigureStreamContainer';
-// const {addItem, updateItem, postItem, getStream, postAction, deleteAction, appendItemArray} = itemActions;
-// const {addNotification, clearNotification} = notificationActions;
-const {/* logout, */showSignInDialog} = authActions;
+const {addItem, updateItem, postItem, getStream, postAction, deleteAction, appendItemArray} = itemActions;
+const {addNotification, clearNotification} = notificationActions;
+const {logout, showSignInDialog} = authActions;
-const assetID = 'bc7b4cef-1e14-46e1-9db4-66465192f168';
+const assetID = 'be97065d-f0eb-44a8-8efb-b416229afdc3';
class CommentStream extends Component {
@@ -44,7 +46,8 @@ class CommentStream extends Component {
super(props);
this.state = {
- activeTab: 0
+ activeTab: 0,
+ showSignInDialog: false
};
this.changeTab = this.changeTab.bind(this);
@@ -99,17 +102,20 @@ class CommentStream extends Component {
// const rootItemId = this.props.items.assets && Object.keys(this.props.items.assets)[0];
// const rootItem = this.props.items.assets && this.props.items.assets[rootItemId];
// const {actions, users, comments} = this.props.items;
- // const {status, moderation, closedMessage, charCount, charCountEnable} = this.props.config;
- // const {loggedIn, isAdmin, user, showSignInDialog, signInOffset} = this.props.auth;
+
+ const {isAdmin, showSignInDialog} = this.props.auth;
const {activeTab} = this.state;
// const banned = (this.props.userData.status === 'banned');
- const {loading, asset} = this.props.data;
+ const {loading, asset, currentUser, refetch} = this.props.data;
+
+ // const {status, moderation, closedMessage, charCount, charCountEnable} = asset.settings;
const expandForLogin = showSignInDialog ? {
minHeight: document.body.scrollHeight + 150
} : {};
+
return
{
loading ?
@@ -117,36 +123,39 @@ class CommentStream extends Component {
Settings
- Configure Stream
+ Configure Stream
- {/* loggedIn && */}
+ {currentUser && }
{
-
- // status === 'open'
- // ?
- // : {closedMessage}
+ status === 'open'
+ ?
+ : {asset.settings.closedMessage}
+ }
+ {
+ !currentUser &&
}
- {/* !loggedIn && */}
{
asset.comments.map((comment) => {
return |