diff --git a/client/coral-admin/src/components/BanUserDialog.css b/client/coral-admin/src/components/BanUserDialog.css index dfac4f194..054c343dd 100644 --- a/client/coral-admin/src/components/BanUserDialog.css +++ b/client/coral-admin/src/components/BanUserDialog.css @@ -1,17 +1,25 @@ .dialog { - border: none; - box-shadow: 0 9px 46px 8px rgba(0, 0, 0, 0.14), 0 11px 15px -7px rgba(0, 0, 0, 0.12), 0 24px 38px 3px rgba(0, 0, 0, 0.2); - width: 280px; - top: 10px; -} + border: none; + box-shadow: 0 9px 46px 8px rgba(0, 0, 0, 0.14), 0 11px 15px -7px rgba(0, 0, 0, 0.12), 0 24px 38px 3px rgba(0, 0, 0, 0.2); + width: 500px; + top: 50%; + transform: translateY(-50%); + height: 184px; + padding: 20px; -.header { - margin-bottom: 20px; -} + h2 { + color: black; + font-size: 1.76em; + font-weight: 500; + margin: 0; + } -.header h1, .separator h1{ - text-align: center; - font-size: 1.2em; + h3 { + color: black; + font-size: 1.4em; + font-weight: 500; + margin: 0; + } } .formField { @@ -143,5 +151,14 @@ input.error{ } .cancel { - margin: 10px 0; + margin-right: 10px; + width: 47%; +} + +.ban { + width: 47%; +} + +.buttons { + margin: 20px 0; } diff --git a/client/coral-admin/src/components/BanUserDialog.js b/client/coral-admin/src/components/BanUserDialog.js index b151d3020..c393df21d 100644 --- a/client/coral-admin/src/components/BanUserDialog.js +++ b/client/coral-admin/src/components/BanUserDialog.js @@ -19,23 +19,23 @@ const BanUserDialog = ({open, handleClose, onClickBanUser, user = {}}) => ( ×
-

+

{lang.t('bandialog.ban_user')} -

+
-

+

{lang.t('bandialog.are_you_sure', user.userName)} -

+ {lang.t('bandialog.note')}
- -
diff --git a/client/coral-admin/src/components/Comment.js b/client/coral-admin/src/components/Comment.js index 17bd56714..0eb4fce95 100644 --- a/client/coral-admin/src/components/Comment.js +++ b/client/coral-admin/src/components/Comment.js @@ -7,9 +7,8 @@ import styles from './CommentList.css'; import I18n from 'coral-framework/modules/i18n/i18n'; import translations from '../translations.json'; -import {Icon} from 'react-mdl'; import Highlighter from 'react-highlight-words'; -import {FabButton, Button} from 'coral-ui'; +import {FabButton, Button, Icon} from 'coral-ui'; const linkify = new Linkify(); @@ -20,22 +19,19 @@ export default props => { const links = linkify.getMatches(comment.body); return ( -
  • +
  • - person {author.displayName || lang.t('comment.anon')} {timeago().format(comment.createdAt || (Date.now() - props.index * 60 * 1000), lang.getLocale().replace('-', '_'))} {comment.flagged ?

    {lang.t('comment.flagged')}

    : null}
    -
    +
    {links ? Contains Link : null}
    {props.modActions.map((action, i) => getActionButton(action, i, props))}
    -
    -
    {authorStatus === 'banned' ? {lang.t('comment.banned_user')} : null}
    @@ -65,15 +61,19 @@ const getActionButton = (action, i, props) => { } if (action === 'ban') { return ( - +
    + +
    ); } return ( diff --git a/client/coral-admin/src/components/CommentList.css b/client/coral-admin/src/components/CommentList.css index fddee7553..b90da3166 100644 --- a/client/coral-admin/src/components/CommentList.css +++ b/client/coral-admin/src/components/CommentList.css @@ -36,13 +36,33 @@ .listItem { border-bottom: 1px solid #e0e0e0; - padding: 16px; font-size: 16px; + width: 100%; + max-width: 660px; + min-width: 400px; + margin: 0 auto; + padding: 16px 14px; + position: relative; + transition: box-shadow 200ms; + + + &:hover { + box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); + } &:last-child { border-bottom: none; } + .sideActions { + position: absolute; + right: 0; + height: 100%; + top: 0; + padding: 40px 18px; + box-sizing: border-box; + } + .itemHeader { display: flex; align-items: center; @@ -71,25 +91,20 @@ .created { color: #666; - font-size: 10px; - margin-left: 10px; + font-size: 13px; + margin-left: 40px; } .actionButton { - transform: scale(.7); + transform: scale(.8); margin: 0; } .body { margin-top: 20px; flex: 1; - font-size: 1em; - color: rgba(0,0,0,.54); - } - - .actions { - margin-left: 10px; - display: flex; + font-size: 0.88em; + color: black; } .flagged { @@ -143,3 +158,20 @@ margin-right: 5px; } } + +.ban { + display: block; + text-align: center; + margin-top: 5px; +} + +.banButton { + width: 114px; + letter-spacing: 1px; + + i { + vertical-align: middle; + margin-right: 10px; + font-size: 14px; + } +} diff --git a/client/coral-admin/src/components/ui/Header.css b/client/coral-admin/src/components/ui/Header.css index a0d7dd30d..8fbdedc0a 100644 --- a/client/coral-admin/src/components/ui/Header.css +++ b/client/coral-admin/src/components/ui/Header.css @@ -1,40 +1,42 @@ .header { - background: #505050; + background-color: transparent; + box-shadow: none; + min-height: 58px; } .header > div { - position: relative; - padding: 0; - width: 1170px; - margin: 0 auto; -} - -.active { - background: #232323; + background-color: #696969; + position: relative; + padding: 0; + min-width: 1280px; + margin: 0 auto; + 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); + height: 58px; } .rightPanel { - position: absolute; - right: 0; - width: 170px; + position: absolute; + right: 0; + width: 170px; + height: 100%; } .rightPanel ul { list-style: none; - line-height: 38px; + margin-right: 20px; } .rightPanel li { display: inline-block; float: right; margin-left: 15px; + font-size: 15px; + font-weight: 500; + line-height: 33px; } .rightPanel .settings { - vertical-align: middle; - border-radius: 3px; - border: solid 1px #9e9e9e; - line-height: 10px; + line-height: 0; } .rightPanel .settings > div { @@ -45,3 +47,25 @@ background: rgba(158, 158, 158, 0.69); cursor: pointer; } + +.navLink { + padding: 0 20px; + font-size: 15px; + font-weight: 500; + background-color: transparent; + transition: background-color 200ms; + + &.active { + background-color: #232323; + } +} + +.nav { + overflow: hidden; + height: 58px !important; +} + +.nav .navLink { + padding: 0 20px; + letter-spacing: 0.4px; +} diff --git a/client/coral-admin/src/components/ui/Header.js b/client/coral-admin/src/components/ui/Header.js index 4c76424cc..4e2b391c8 100644 --- a/client/coral-admin/src/components/ui/Header.js +++ b/client/coral-admin/src/components/ui/Header.js @@ -9,7 +9,7 @@ import {Logo} from './Logo'; export default ({handleLogout}) => (
    - + {lang.t('configure.moderate')} (

    - + Talk

    diff --git a/client/coral-admin/src/containers/Community/Community.css b/client/coral-admin/src/containers/Community/Community.css index b19d0261d..6c101fcaf 100644 --- a/client/coral-admin/src/containers/Community/Community.css +++ b/client/coral-admin/src/containers/Community/Community.css @@ -1,17 +1,96 @@ -.roleButton { - display: block; +.container { + padding: 10px; + display: flex; + padding-bottom: 200px; } -.searchInput { - display: block; - padding-left: 40px; - width: auto; +.leftColumn { + padding: 42px 56px; + width: 234px; +} + +.mainContent { + width: calc(100% - 300px); + padding: 34px 14px; + box-sizing: border-box; +} + +.roleButton { + display: block; } .searchBox { - background: white; + width: 100%; + padding: 9px; + border: 1px solid #ccc; + border-radius: 2px; + display: flex; + background: white; + box-sizing: border-box; + height: 40px; + + i { + color: #A1A1A1 + } + + input { + display: block; + width: 100%; + height: 100%; + border: none; + font-size: 16px; + padding: 0 2px 0 15px; + box-sizing: border-box; + } } .email { - display: block; + display: block; +} + +.dataTable { + width: 100%; + border-left: none; + border-right: none; + + th { + font-size: 1.1em; + } + + th:nth-child(2), th:nth-child(3) { + width: 100px; + } +} + +.selectField { + position: relative; + width: 150px; + height: 36px; + background: #2c2c2c; + padding: 10px 15px; + box-sizing: border-box; + color: white; + border-radius: 2px; + 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); + + > div { + padding: 0; + } + + i { + position: absolute; + top: 7px; + right: 7px; + } + + input { + padding: 0; + font-size: 13px; + letter-spacing: 0.7px; + font-weight: 400; + } + + &:hover { + cursor: pointer; + } } diff --git a/client/coral-admin/src/containers/Community/Community.js b/client/coral-admin/src/containers/Community/Community.js index 286a7f364..d63dd1e96 100644 --- a/client/coral-admin/src/containers/Community/Community.js +++ b/client/coral-admin/src/containers/Community/Community.js @@ -1,13 +1,12 @@ import React from 'react'; import I18n from 'coral-framework/modules/i18n/i18n'; import translations from '../../translations.json'; -import {Grid, Cell} from 'react-mdl'; import styles from './Community.css'; import Table from './Table'; import Loading from './Loading'; import NoResults from './NoResults'; -import Pager from 'coral-ui/components/Pager'; +import {Pager} from 'coral-ui'; const lang = new I18n(translations); @@ -33,17 +32,17 @@ const tableHeaders = [ const Community = ({isFetching, commenters, ...props}) => { const hasResults = !isFetching && !!commenters.length; return ( - - +
    +
    -
    -
    +
    { isFetching && } { !hasResults && } { hasResults && @@ -68,8 +67,8 @@ const Community = ({isFetching, commenters, ...props}) => { page={props.page} onNewPageHandler={props.onNewPageHandler} /> - - +
    +
    ); }; 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')}