summaryrefslogtreecommitdiffstats
path: root/web/react/components/post_header.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-03-14 08:50:46 -0400
committerChristopher Speller <crspeller@gmail.com>2016-03-16 18:02:55 -0400
commit12896bd23eeba79884245c1c29fdc568cf21a7fa (patch)
tree4e7f83d3e2564b9b89d669e9f7905ff11768b11a /web/react/components/post_header.jsx
parent29fe6a3d13c9c7aa490fffebbe5d1b5fdf1e3090 (diff)
downloadchat-12896bd23eeba79884245c1c29fdc568cf21a7fa.tar.gz
chat-12896bd23eeba79884245c1c29fdc568cf21a7fa.tar.bz2
chat-12896bd23eeba79884245c1c29fdc568cf21a7fa.zip
Converting to Webpack. Stage 1.
Diffstat (limited to 'web/react/components/post_header.jsx')
-rw-r--r--web/react/components/post_header.jsx78
1 files changed, 0 insertions, 78 deletions
diff --git a/web/react/components/post_header.jsx b/web/react/components/post_header.jsx
deleted file mode 100644
index 966775dad..000000000
--- a/web/react/components/post_header.jsx
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
-// See License.txt for license information.
-
-import UserProfile from './user_profile.jsx';
-import PostInfo from './post_info.jsx';
-import * as Utils from '../utils/utils.jsx';
-
-import Constants from '../utils/constants.jsx';
-
-export default class PostHeader extends React.Component {
- constructor(props) {
- super(props);
- this.state = {};
- }
- render() {
- const post = this.props.post;
-
- let userProfile = <UserProfile user={this.props.user}/>;
- let botIndicator;
-
- if (post.props && post.props.from_webhook) {
- if (post.props.override_username && global.window.mm_config.EnablePostUsernameOverride === 'true') {
- userProfile = (
- <UserProfile
- user={this.props.user}
- overwriteName={post.props.override_username}
- disablePopover={true}
- />
- );
- }
-
- botIndicator = <li className='col col__name bot-indicator'>{'BOT'}</li>;
- } else if (Utils.isSystemMessage(post)) {
- userProfile = (
- <UserProfile
- user={{}}
- overwriteName={Constants.SYSTEM_MESSAGE_PROFILE_NAME}
- overwriteImage={Constants.SYSTEM_MESSAGE_PROFILE_IMAGE}
- disablePopover={true}
- />
- );
- }
-
- return (
- <ul className='post__header'>
- <li className='col col__name'>{userProfile}</li>
- {botIndicator}
- <li className='col'>
- <PostInfo
- post={post}
- commentCount={this.props.commentCount}
- handleCommentClick={this.props.handleCommentClick}
- allowReply='true'
- isLastComment={this.props.isLastComment}
- sameUser={this.props.sameUser}
- currentUser={this.props.currentUser}
- />
- </li>
- </ul>
- );
- }
-}
-
-PostHeader.defaultProps = {
- post: null,
- commentCount: 0,
- isLastComment: false,
- sameUser: false
-};
-PostHeader.propTypes = {
- post: React.PropTypes.object.isRequired,
- user: React.PropTypes.object,
- currentUser: React.PropTypes.object.isRequired,
- commentCount: React.PropTypes.number.isRequired,
- isLastComment: React.PropTypes.bool.isRequired,
- handleCommentClick: React.PropTypes.func.isRequired,
- sameUser: React.PropTypes.bool.isRequired
-};