diff --git a/client/coral-embed-stream/src/CommentStream.js b/client/coral-embed-stream/src/CommentStream.js index 40d249088..be40ecff6 100644 --- a/client/coral-embed-stream/src/CommentStream.js +++ b/client/coral-embed-stream/src/CommentStream.js @@ -3,7 +3,7 @@ import { itemActions, Notification, notificationActions, - authActions + authActions, } from '../../coral-framework'; import {connect} from 'react-redux'; import CommentBox from '../../coral-plugin-commentbox/CommentBox'; @@ -19,6 +19,8 @@ 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 {TabBar, Tab, TabContent} from '../../coral-ui'; +import SettingsContainer from '../../coral-settings/containers/SettingsContainer'; const {addItem, updateItem, postItem, getStream, postAction, deleteAction, appendItemArray} = itemActions; const {addNotification, clearNotification} = notificationActions; @@ -46,11 +48,27 @@ const mapDispatchToProps = (dispatch) => ({ }, appendItemArray: (item, property, value, addToFront, itemType) => dispatch(appendItemArray(item, property, value, addToFront, itemType)), - logout: () => dispatch(logout()) + logout: () => dispatch(logout()), }); class CommentStream extends Component { + constructor (props) { + super(props); + + this.state = { + activeTab: 0 + }; + + this.changeTab = this.changeTab.bind(this); + } + + changeTab (tab) { + this.setState({ + activeTab: tab + }); + } + static propTypes = { items: PropTypes.object.isRequired, addItem: PropTypes.func.isRequired, @@ -90,137 +108,148 @@ class CommentStream extends Component { const rootItem = this.props.items.assets && this.props.items.assets[rootItemId]; const {actions, users, comments} = this.props.items; const {loggedIn, user, showSignInDialog} = this.props.auth; + const {activeTab} = this.state; return
{ rootItem ?
-
- - - {loggedIn && } - - {!loggedIn && } -
- { - rootItem.comments && rootItem.comments.map((commentId) => { - const comment = comments[commentId]; - return
-
- - - -
- - -
-
- - -
- - { - comment.children && - comment.children.map((replyId) => { - let reply = this.props.items.comments[replyId]; - return
-
- - - -
- + + Settings + + + +
+ + {loggedIn && } + + {!loggedIn && } +
+ { + rootItem.comments && rootItem.comments.map((commentId) => { + const comment = comments[commentId]; + return
+
+ + + +
+ + +
+
+ + +
+ + { + comment.children && + comment.children.map((replyId) => { + let reply = this.props.items.comments[replyId]; + return
+
+ + + +
+ + +
+
+ + +
+ - -
-
- - -
- -
; - }) - } -
; - }) - } - +
; + }) + } +
; + }) + } + + + + +
: 'Loading' } diff --git a/client/coral-embed-stream/style/default.css b/client/coral-embed-stream/style/default.css index 174f3ef16..2da0c09c4 100644 --- a/client/coral-embed-stream/style/default.css +++ b/client/coral-embed-stream/style/default.css @@ -154,11 +154,6 @@ hr { color: #F00; } -/* Comment count styles */ -.coral-plugin-comment-count-text { - margin-bottom: 15px; -} - .coral-plugin-pubdate-text { color: #CCC; display: inline-block; diff --git a/client/coral-framework/index.js b/client/coral-framework/index.js index 837c8956a..7b721badc 100644 --- a/client/coral-framework/index.js +++ b/client/coral-framework/index.js @@ -11,5 +11,5 @@ export { itemActions, I18n, notificationActions, - authActions + authActions, }; diff --git a/client/coral-framework/reducers/index.js b/client/coral-framework/reducers/index.js index b38de61ae..90eaa7cb7 100644 --- a/client/coral-framework/reducers/index.js +++ b/client/coral-framework/reducers/index.js @@ -14,5 +14,5 @@ export default combineReducers({ config, items, notification, - auth + auth, }); diff --git a/client/coral-settings/components/Bio.css b/client/coral-settings/components/Bio.css new file mode 100644 index 000000000..8c36b989d --- /dev/null +++ b/client/coral-settings/components/Bio.css @@ -0,0 +1,21 @@ +.bio textarea { + width: 100%; + box-sizing: border-box; + border-radius: 2px; + min-height: 100px; + margin: 10px 0; + border: solid 1px #d8d8d8; +} + +.bio h1 { + font-size: 16px; + margin: 3px 0; +} + +.bio p { + margin: 3px 0; +} + +.actions { + text-align: right; +} diff --git a/client/coral-settings/components/Bio.js b/client/coral-settings/components/Bio.js new file mode 100644 index 000000000..b82587322 --- /dev/null +++ b/client/coral-settings/components/Bio.js @@ -0,0 +1,16 @@ +import React from 'react'; +import styles from './Bio.css'; +import {Button} from '../../coral-ui'; + +export default () => ( +
+

Bio

+

Tell the community about yourself

+