import React, {PropTypes} from 'react'; import LoadMore from './LoadMore'; import NewCount from './NewCount'; import Comment from '../containers/Comment'; import SuspendedAccount from './SuspendedAccount'; import Slot from 'coral-framework/components/Slot'; import InfoBox from 'coral-plugin-infobox/InfoBox'; import {can} from 'coral-framework/services/perms'; import {ModerationLink} from 'coral-plugin-moderation'; import RestrictedMessageBox from 'coral-framework/components/RestrictedMessageBox'; import t, {timeago} from 'coral-framework/services/i18n'; import CommentBox from 'coral-plugin-commentbox/CommentBox'; import QuestionBox from 'coral-plugin-questionbox/QuestionBox'; import IgnoredCommentTombstone from './IgnoredCommentTombstone'; class Stream extends React.Component { setActiveReplyBox = (reactKey) => { if (!this.props.auth.user) { this.props.showSignInDialog(); } else { this.props.setActiveReplyBox(reactKey); } }; render() { const { classNames, root: {asset, asset: {comments}, comment, me}, postComment, addNotification, postFlag, postDontAgree, deleteAction, showSignInDialog, addCommentTag, ignoreUser, auth: {loggedIn, user}, removeCommentTag, pluginProps, commentCountCache, editName } = this.props; const open = asset.closedAt === null; // even though the permalinked comment is the highlighted one, we're displaying its parent + replies const highlightedComment = comment && comment.parent ? comment.parent : comment; const banned = user && user.status === 'BANNED'; const temporarilySuspended = user && user.suspension.until && new Date(user.suspension.until) > new Date(); const commentIsIgnored = (comment) => { return ( me && me.ignoredUsers && me.ignoredUsers.find((u) => u.id === comment.user.id) ); }; return (
{asset.settings.closedMessage}
} {loggedIn && (