Merge issues

This commit is contained in:
okbel
2018-03-05 12:56:36 -03:00
parent 1d31099c9d
commit 87ea7b5dae
4 changed files with 10 additions and 84 deletions
+2 -8
View File
@@ -56,16 +56,10 @@ plugins/*
!plugins/talk-plugin-sort-newest
!plugins/talk-plugin-sort-oldest
!plugins/talk-plugin-subscriber
<<<<<<< HEAD
!plugins/talk-plugin-flag-details
!plugins/talk-plugin-slack-notifications
!plugins/talk-plugin-rich-text
!plugins/talk-plugin-rich-text-pell
!plugins/talk-plugin-profile-settings
=======
!plugins/talk-plugin-toxic-comments
!plugins/talk-plugin-viewing-options
>>>>>>> 8d147dbf47104cdcfb8c3bc2ebb02b6c73c7b8ab
!plugins/talk-plugin-rich-text
!plugins/talk-plugin-rich-text-pell
**/node_modules/*
yarn-error.log
@@ -372,9 +372,12 @@ export default class Comment extends React.Component {
maxCharCount,
notify,
charCountEnable,
root,
} = this.props;
return (
<ReplyBox
root={root}
comment={comment}
commentPostedHandler={this.commentPostedHandler}
charCountEnable={charCountEnable}
maxCharCount={maxCharCount}
@@ -648,6 +651,7 @@ export default class Comment extends React.Component {
<EditableCommentContent
editComment={this.editComment}
notify={notify}
root={root}
comment={comment}
currentUser={currentUser}
charCountEnable={charCountEnable}
@@ -720,64 +724,6 @@ export default class Comment extends React.Component {
);
}
<<<<<<< HEAD
{activeReplyBox === comment.id ? (
<ReplyBox
comment={comment}
commentPostedHandler={this.commentPostedHandler}
charCountEnable={charCountEnable}
maxCharCount={maxCharCount}
setActiveReplyBox={setActiveReplyBox}
parentId={depth < THREADING_LEVEL ? comment.id : parentId}
notify={notify}
postComment={postComment}
currentUser={currentUser}
assetId={asset.id}
/>
) : null}
<TransitionGroup>
{view.map(reply => {
return (
<CommentContainer
data={this.props.data}
root={this.props.root}
setActiveReplyBox={setActiveReplyBox}
disableReply={disableReply}
activeReplyBox={activeReplyBox}
notify={notify}
parentId={comment.id}
postComment={postComment}
editComment={this.props.editComment}
depth={depth + 1}
asset={asset}
highlighted={highlighted}
currentUser={currentUser}
postFlag={postFlag}
deleteAction={deleteAction}
loadMore={loadMore}
charCountEnable={charCountEnable}
maxCharCount={maxCharCount}
showSignInDialog={showSignInDialog}
liveUpdates={liveUpdates}
reactKey={reply.id}
key={reply.id}
comment={reply}
emit={emit}
/>
);
})}
</TransitionGroup>
<div className="talk-load-more-replies">
<LoadMore
topLevel={false}
replyCount={moreRepliesCount}
moreComments={hasMoreComments}
loadMore={this.loadNewReplies}
loadingState={loadingState}
/>
</div>
=======
render() {
const {
depth,
@@ -813,7 +759,6 @@ export default class Comment extends React.Component {
{this.renderComment()}
{activeReplyBox === comment.id && this.renderReplyBox()}
{this.renderRepliesContainer()}
>>>>>>> 8d147dbf47104cdcfb8c3bc2ebb02b6c73c7b8ab
</div>
);
}
@@ -18,7 +18,7 @@ class EditableCommentContent extends React.Component {
static propTypes = {
// show notification to the user (e.g. for errors)
notify: PropTypes.func.isRequired,
root: PropTypes.object.isRequired,
// comment that is being edited
comment: PropTypes.shape({
id: PropTypes.string,
@@ -140,6 +140,7 @@ class EditableCommentContent extends React.Component {
return (
<div className={styles.editCommentForm}>
<CommentForm
root={this.props.root}
comment={this.props.comment}
defaultValue={this.props.comment.body}
bodyInputId={id}
+2 -16
View File
@@ -1,16 +1,11 @@
const CommentModel = require('../models/comment');
const { dotize } = require('./utils');
const debug = require('debug')('talk:services:comments');
const SettingsService = require('./settings');
const cloneDeep = require('lodash/cloneDeep');
const errors = require('../errors');
const merge = require('lodash/merge');
<<<<<<< HEAD
const { dotize } = require('./utils');
const { COMMENTS_NEW, COMMENTS_EDIT } = require('./events/constants');
=======
>>>>>>> 8d147dbf47104cdcfb8c3bc2ebb02b6c73c7b8ab
const incrReplyCount = async (comment, value) => {
try {
@@ -86,11 +81,7 @@ module.exports = {
* @param {String} body the new Comment body
* @param {String} status the new Comment status
*/
<<<<<<< HEAD
static async edit({ id, author_id, body, status, metadata = {} }) {
=======
edit: async ({ id, author_id, body, status }) => {
>>>>>>> 8d147dbf47104cdcfb8c3bc2ebb02b6c73c7b8ab
edit: async ({ id, author_id, body, status, metadata = {} }) => {
const EDITABLE_STATUSES = ['NONE', 'PREMOD', 'ACCEPTED'];
const created_at = new Date();
@@ -177,13 +168,8 @@ module.exports = {
created_at,
});
<<<<<<< HEAD
editedComment.metadata = metadata;
await events.emitAsync(COMMENTS_EDIT, originalComment, editedComment);
=======
>>>>>>> 8d147dbf47104cdcfb8c3bc2ebb02b6c73c7b8ab
return editedComment;
},