Addressing setting bug caused by open thread feature.

This commit is contained in:
David Jay
2016-12-07 21:12:31 -05:00
parent 3be1556803
commit 18f7b07198
7 changed files with 28 additions and 15 deletions
@@ -80,7 +80,7 @@ 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 {status} = this.props.config;
const {status, moderation} = this.props.config;
const {activeTab} = this.state;
return <div className={showSignInDialog ? 'expandForSignin' : ''}>
@@ -109,7 +109,7 @@ class CommentStream extends Component {
appendItemArray={this.props.appendItemArray}
updateItem={this.props.updateItem}
id={rootItemId}
premod={this.props.config.moderation}
premod={moderation}
reply={false}
author={user}
/>
@@ -165,7 +165,7 @@ class CommentStream extends Component {
id={rootItemId}
author={user}
parent_id={commentId}
premod={this.props.config.moderation}
premod={moderation}
showReply={comment.showReply}/>
{
comment.children &&
@@ -218,7 +218,7 @@ class CommentStream extends Component {
author={user}
parent_id={commentId}
child_id={replyId}
premod={this.props.config.moderation}
premod={moderation}
showReply={reply.showReply}/>
</div>;
})
+1 -1
View File
@@ -4,7 +4,7 @@ import coralApi from '../helpers/response';
/**
* Action name constants
*/
export const UPDATE_SETTINGS = 'UPDATE_SETTINGS';
export const OPEN_COMMENTS = 'OPEN_COMMENTS';
export const CLOSE_COMMENTS = 'CLOSE_COMMENTS';
export const ADD_ITEM = 'ADD_ITEM';
+1 -1
View File
@@ -12,7 +12,7 @@ export default (state = initialState, action) => {
switch(action.type) {
// Override config if worked
case actions.UPDATE_SETTINGS:
return action.config;
return state.merge(action.config);
case actions.OPEN_COMMENTS:
return state.set('status', 'open');
+1 -2
View File
@@ -6,7 +6,7 @@ import * as actions from '../actions/items';
const initialState = fromJS({
comments: {},
users: {},
actions: {}
actions: {}
});
export default (state = initialState, action) => {
@@ -17,7 +17,6 @@ export default (state = initialState, action) => {
return state.setIn([action.item_type, action.id, action.property], fromJS(action.value));
case actions.APPEND_ITEM_ARRAY:
return state.updateIn([action.item_type, action.id, action.property], (prop) => {
console.log(prop);
if (action.add_to_front) {
return prop ? prop.unshift(fromJS(action.value)) : fromJS([action.value]);
} else {
+3 -3
View File
@@ -58,13 +58,13 @@ export default class FlagButton extends Component {
{val: 'I don\'t agree with this comment', text: lang.t('no-agree-comment')},
{val: 'This comment is offensive', text: lang.t('comment-offensive')},
{val: 'This comment reveals personally identifiable inforation without consent', text: lang.t('personal-info')},
{val: 'Other', text: 'Other'},
{val: 'Other', text: lang.t('other')},
]
: [
{val: 'This username is offensive', text: lang.t('username-offensive')},
{val: 'I don\'t like this username', text: lang.t('no-like-username')},
{val: 'This looks like an ad/marketing', text: lang.t('marketing')},
{val: 'Other', text: 'Other'},
{val: 'This looks like an ad/marketing', text: lang.t('marketing ')},
{val: 'Other', text: lang.t('other')},
];
return {
header: lang.t('step-2-header'),
+17 -3
View File
@@ -12,17 +12,31 @@
"continue": "Continue",
"no-agree-comment": "I don't agree with this comment",
"comment-offensive": "This comment is offensive",
"personal-info": "This comment reveals personally identifiable inforation without consent",
"personal-info": "This comment reveals personally identifiable information",
"username-offensive": "This username is offensive",
"no-like-username": "I don't like this username",
"marketing": "This looks like an ad/marketing",
"thank-you": "We value your safety and feedback. A moderator will review your flag."
"thank-you": "We value your safety and feedback. A moderator will review your flag.",
"other": "Other"
},
"es": {
"report": "Informe",
"reported": "Informado",
"report-notif": "Gracias por marcar este comentario. Nuestro equipo de moderación ha sido notificado y muy pronto lo va a revisar.",
"report-notif-remove": "¡traduceme!",
"report-header": "¡traduceme!"
"step-1-header": "¡traduceme!",
"step-2-header": "¡traduceme!",
"step-3-header": "¡traduceme!",
"flag-username": "¡traduceme!",
"flag-comment": "¡traduceme!",
"continue": "¡traduceme!",
"no-agree-comment": "¡traduceme!",
"comment-offensive": "¡traduceme!",
"personal-info": "¡traduceme!",
"username-offensive": "¡traduceme!",
"no-like-username": "¡traduceme!",
"marketing": "¡traduceme!",
"thank-you": "¡traduceme!",
"other": "¡traduceme!"
}
}
+1 -1
View File
@@ -21,7 +21,7 @@
cursor: pointer;
text-decoration: none;
text-align: center;
line-height: 36px;
line-height: 28px;
vertical-align: middle;
margin: 2px;
}