+const ModerationMenu = ({asset, premodCount, rejectedCount, flaggedCount, selectSort, sort}) => {
+ const premodPath = asset ? `/admin/moderate/premod/${asset.id}` : '/admin/moderate/premod';
+ const rejectPath = asset ? `/admin/moderate/rejected/${asset.id}` : '/admin/moderate/rejected';
+ const flagPath = asset ? `/admin/moderate/flagged/${asset.id}` : '/admin/moderate/flagged';
+ return (
+
+
+
+
+
+ {lang.t('modqueue.premod')}
+
+
+ {lang.t('modqueue.rejected')}
+
+
+ {lang.t('modqueue.flagged')}
+
+
selectSort(sort)}>
+
+
+
- );
- }
-}
+
+ );
+};
+
+ModerationMenu.propTypes = {
+ premodCount: PropTypes.number.isRequired,
+ rejectedCount: PropTypes.number.isRequired,
+ flaggedCount: PropTypes.number.isRequired,
+ asset: PropTypes.shape({
+ id: PropTypes.string
+ })
+};
export default ModerationMenu;
diff --git a/client/coral-admin/src/containers/ModerationQueue/components/styles.css b/client/coral-admin/src/containers/ModerationQueue/components/styles.css
index 59f47faad..9576045de 100644
--- a/client/coral-admin/src/containers/ModerationQueue/components/styles.css
+++ b/client/coral-admin/src/containers/ModerationQueue/components/styles.css
@@ -84,11 +84,10 @@ span {
margin-bottom: -1px;
.settingsButton {
- i {
- vertical-align: middle;
- margin-left: 10px;
- margin-top: -4px;
- }
+ vertical-align: middle;
+ margin-left: 10px;
+ margin-top: -4px;
+ font-size: 16px;
}
.moderateAsset {
@@ -114,7 +113,15 @@ span {
}
&:nth-child(2) {
- text-align: center;
+ span {
+ text-align: center;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+ max-width: 344px;
+ display: inline-block;
+ vertical-align: top;
+ }
}
&:last-child {
@@ -387,3 +394,23 @@ span {
cursor: pointer;
}
}
+
+.loadMoreContainer {
+ display: flex;
+ justify-content: center;
+ width: 100%;
+};
+
+.loadMore {
+ width: 100%;
+ text-align: center;
+ color: #FFF;
+ max-width: 660px;
+ margin-bottom: 30px;
+ background-color: #2376D8;
+ cursor: pointer;
+}
+
+.loadMore:hover {
+ background-color: #4399FF;
+}
diff --git a/client/coral-admin/src/containers/Streams/Streams.js b/client/coral-admin/src/containers/Streams/Streams.js
index 96130fcba..bd5ce6e85 100644
--- a/client/coral-admin/src/containers/Streams/Streams.js
+++ b/client/coral-admin/src/containers/Streams/Streams.js
@@ -80,8 +80,8 @@ class Streams extends Component {
- {closed ? lang.t('streams.closed') : lang.t('streams.open')}
{!statusMenuOpen && }
+ {closed ? lang.t('streams.closed') : lang.t('streams.open')}
{
statusMenuOpen &&
diff --git a/client/coral-admin/src/graphql/mutations/index.js b/client/coral-admin/src/graphql/mutations/index.js
index fe3a1faf9..4a574cc93 100644
--- a/client/coral-admin/src/graphql/mutations/index.js
+++ b/client/coral-admin/src/graphql/mutations/index.js
@@ -1,6 +1,7 @@
import {graphql} from 'react-apollo';
import SET_USER_STATUS from './setUserStatus.graphql';
import SET_COMMENT_STATUS from './setCommentStatus.graphql';
+import SUSPEND_USER from './suspendUser.graphql';
export const banUser = graphql(SET_USER_STATUS, {
props: ({mutate}) => ({
@@ -9,11 +10,39 @@ export const banUser = graphql(SET_USER_STATUS, {
variables: {
userId,
status: 'BANNED'
- }
+ },
+ refetchQueries: ['Users']
});
}}),
});
+export const setUserStatus = graphql(SET_USER_STATUS, {
+ props: ({mutate}) => ({
+ approveUser: ({userId}) => {
+ return mutate({
+ variables: {
+ userId,
+ status: 'APPROVED'
+ },
+ refetchQueries: ['Users']
+ });
+ }
+ })
+});
+
+export const suspendUser = graphql(SUSPEND_USER, {
+ props: ({mutate}) => ({
+ suspendUser: ({userId}) => {
+ return mutate({
+ variables: {
+ userId
+ },
+ refetchQueries: ['Users']
+ });
+ }
+ })
+});
+
export const setCommentStatus = graphql(SET_COMMENT_STATUS, {
props: ({mutate}) => ({
acceptComment: ({commentId}) => {
@@ -22,7 +51,26 @@ export const setCommentStatus = graphql(SET_COMMENT_STATUS, {
commentId,
status: 'ACCEPTED'
},
- refetchQueries: ['ModQueue']
+ updateQueries: {
+ ModQueue: (oldData) => {
+ const premod = oldData.premod.filter(c => c.id !== commentId);
+ const flagged = oldData.flagged.filter(c => c.id !== commentId);
+ const rejected = oldData.rejected.filter(c => c.id !== commentId);
+ const premodCount = premod.length < oldData.premod.length ? oldData.premodCount - 1 : oldData.premodCount;
+ const flaggedCount = flagged.length < oldData.flagged.length ? oldData.flaggedCount - 1 : oldData.flaggedCount;
+ const rejectedCount = rejected.length < oldData.rejected.length ? oldData.rejectedCount - 1 : oldData.rejectedCount;
+
+ return {
+ ...oldData,
+ premodCount,
+ flaggedCount,
+ rejectedCount,
+ premod,
+ flagged,
+ rejected,
+ };
+ }
+ }
});
},
rejectComment: ({commentId}) => {
@@ -31,7 +79,27 @@ export const setCommentStatus = graphql(SET_COMMENT_STATUS, {
commentId,
status: 'REJECTED'
},
- refetchQueries: ['ModQueue']
+ updateQueries: {
+ ModQueue: (oldData) => {
+ const comment = oldData.premod.concat(oldData.flagged).filter(c => c.id === commentId)[0];
+ const rejected = [comment].concat(oldData.rejected);
+ const premod = oldData.premod.filter(c => c.id !== commentId);
+ const flagged = oldData.flagged.filter(c => c.id !== commentId);
+ const premodCount = premod.length < oldData.premod.length ? oldData.premodCount - 1 : oldData.premodCount;
+ const flaggedCount = flagged.length < oldData.flagged.length ? oldData.flaggedCount - 1 : oldData.flaggedCount;
+ const rejectedCount = oldData.rejectedCount + 1;
+
+ return {
+ ...oldData,
+ premodCount,
+ flaggedCount,
+ rejectedCount,
+ premod,
+ flagged,
+ rejected
+ };
+ }
+ }
});
}
})
diff --git a/client/coral-admin/src/graphql/mutations/suspendUser.graphql b/client/coral-admin/src/graphql/mutations/suspendUser.graphql
new file mode 100644
index 000000000..f34d93370
--- /dev/null
+++ b/client/coral-admin/src/graphql/mutations/suspendUser.graphql
@@ -0,0 +1,7 @@
+mutation suspendUser($userId: ID!) {
+ suspendUser(id: $userId) {
+ errors {
+ translation_key
+ }
+ }
+}
diff --git a/client/coral-admin/src/graphql/queries/index.js b/client/coral-admin/src/graphql/queries/index.js
index c4a30ad44..291ea6bc5 100644
--- a/client/coral-admin/src/graphql/queries/index.js
+++ b/client/coral-admin/src/graphql/queries/index.js
@@ -1,6 +1,8 @@
import {graphql} from 'react-apollo';
import MOD_QUEUE_QUERY from './modQueueQuery.graphql';
+import MOD_QUEUE_LOAD_MORE from './loadMore.graphql';
+import MOD_USER_FLAGGED_QUERY from './modUserFlaggedQuery.graphql';
import METRICS from './metricsQuery.graphql';
export const modQueueQuery = graphql(MOD_QUEUE_QUERY, {
@@ -14,7 +16,8 @@ export const modQueueQuery = graphql(MOD_QUEUE_QUERY, {
},
props: ({ownProps: {params: {id = null}}, data}) => ({
data,
- modQueueResort: modQueueResort(id, data.fetchMore)
+ modQueueResort: modQueueResort(id, data.fetchMore),
+ loadMore: loadMore(data.fetchMore)
})
});
@@ -30,6 +33,42 @@ export const getMetrics = graphql(METRICS, {
}
});
+export const loadMore = (fetchMore) => ({limit, cursor, sort, tab, asset_id}) => {
+ let statuses;
+ switch(tab) {
+ case 'premod':
+ statuses = ['PREMOD'];
+ break;
+ case 'flagged':
+ statuses = ['NONE', 'PREMOD'];
+ break;
+ case 'rejected':
+ statuses = ['REJECTED'];
+ break;
+ }
+ return fetchMore({
+ query: MOD_QUEUE_LOAD_MORE,
+ variables: {
+ limit,
+ cursor,
+ sort,
+ statuses,
+ asset_id
+ },
+ updateQuery: (oldData, {fetchMoreResult:{data:{comments}}}) => {
+ return {
+ ...oldData,
+ [tab]: [
+ ...oldData[tab],
+ ...comments
+ ]
+ };
+ }
+ });
+};
+
+export const modUserFlaggedQuery = graphql(MOD_USER_FLAGGED_QUERY);
+
export const modQueueResort = (id, fetchMore) => (sort) => {
return fetchMore({
query: MOD_QUEUE_QUERY,
diff --git a/client/coral-admin/src/graphql/queries/loadMore.graphql b/client/coral-admin/src/graphql/queries/loadMore.graphql
new file mode 100644
index 000000000..56966a804
--- /dev/null
+++ b/client/coral-admin/src/graphql/queries/loadMore.graphql
@@ -0,0 +1,13 @@
+#import "../fragments/commentView.graphql"
+
+query LoadMoreModQueue($limit: Int = 10, $cursor: Date, $sort: SORT_ORDER, $asset_id: ID, $statuses:[COMMENT_STATUS!]) {
+ comments(query: {limit: $limit, cursor: $cursor, asset_id: $asset_id, statuses: $statuses, sort: $sort}) {
+ ...commentView
+ action_summaries {
+ count
+ ... on FlagActionSummary {
+ reason
+ }
+ }
+ }
+}
diff --git a/client/coral-admin/src/graphql/queries/modUserFlaggedQuery.graphql b/client/coral-admin/src/graphql/queries/modUserFlaggedQuery.graphql
new file mode 100644
index 000000000..1e6a6e53b
--- /dev/null
+++ b/client/coral-admin/src/graphql/queries/modUserFlaggedQuery.graphql
@@ -0,0 +1,22 @@
+query Users ($n: ACTION_TYPE) {
+ users (query:{action_type: $n}){
+ id
+ username
+ status
+ roles
+ actions{
+ id
+ created_at
+ ... on FlagAction {
+ reason
+ }
+ user {
+ username
+ }
+ }
+ action_summaries {
+ count
+ reason
+ }
+ }
+}
diff --git a/client/coral-admin/src/reducers/community.js b/client/coral-admin/src/reducers/community.js
index 367e67b2a..d051ae0ff 100644
--- a/client/coral-admin/src/reducers/community.js
+++ b/client/coral-admin/src/reducers/community.js
@@ -6,58 +6,88 @@ import {
FETCH_COMMENTERS_SUCCESS,
SORT_UPDATE,
SET_ROLE,
- SET_COMMENTER_STATUS
+ SET_COMMENTER_STATUS,
+ SHOW_BANUSER_DIALOG,
+ HIDE_BANUSER_DIALOG,
+ SHOW_SUSPENDUSER_DIALOG,
+ HIDE_SUSPENDUSER_DIALOG
} from '../constants/community';
const initialState = Map({
community: Map(),
- isFetching: false,
- error: '',
- commenters: [],
- field: 'created_at',
- asc: false,
- totalPages: 0,
- page: 0
+ isFetchingPeople: false,
+ errorPeople: '',
+ accounts: [],
+ fieldPeople: 'created_at',
+ ascPeople: false,
+ totalPagesPeople: 0,
+ pagePeople: 0,
+ user: Map({}),
+ banDialog: false,
+ suspendDialog: false
});
export default function community (state = initialState, action) {
switch (action.type) {
case FETCH_COMMENTERS_REQUEST :
return state
- .set('isFetching', true);
+ .set('isFetchingPeople', true);
case FETCH_COMMENTERS_FAILURE :
return state
- .set('isFetching', false)
- .set('error', action.error);
+ .set('isFetchingPeople', false)
+ .set('errorPeople', action.error);
+
case FETCH_COMMENTERS_SUCCESS : {
- const {commenters, type, ...rest} = action; // eslint-disable-line
+ const {accounts, type, page, count, limit, totalPages, ...rest} = action; // eslint-disable-line
return state
.merge({
- isFetching: false,
- error: '',
+ isFetchingPeople: false,
+ errorPeople: '',
+ pagePeople: page,
+ countPeople: count,
+ limitPeople: limit,
+ totalPagesPeople: totalPages,
...rest
})
- .set('commenters', commenters); // Sets to normal array
+ .set('accounts', accounts); // Sets to normal array
}
case SET_ROLE : {
- const commenters = state.get('commenters');
+ const commenters = state.get('accounts');
const idx = commenters.findIndex(el => el.id === action.id);
commenters[idx].roles[0] = action.role;
- return state.set('commenters', commenters.map(id => id));
+ return state.set('accounts', commenters.map(id => id));
}
case SET_COMMENTER_STATUS: {
- const commenters = state.get('commenters');
+ const commenters = state.get('accounts');
const idx = commenters.findIndex(el => el.id === action.id);
commenters[idx].status = action.status;
- return state.set('commenters', commenters.map(id => id));
+ return state.set('accounts', commenters.map(id => id));
}
case SORT_UPDATE :
return state
- .set('field', action.sort.field)
- .set('asc', !state.get('asc'));
+ .set('fieldPeople', action.sort.field)
+ .set('ascPeople', !state.get('ascPeople'));
+ case HIDE_BANUSER_DIALOG:
+ return state
+ .set('banDialog', false);
+ case SHOW_BANUSER_DIALOG:
+ return state
+ .merge({
+ user: Map(action.user),
+ banDialog: true
+ });
+ case HIDE_SUSPENDUSER_DIALOG:
+ return state
+ .set('suspendDialog', false);
+ case SHOW_SUSPENDUSER_DIALOG:
+ return state
+ .merge({
+ user: Map(action.user),
+ suspendDialog: true
+ });
default :
return state;
}
diff --git a/client/coral-admin/src/reducers/moderation.js b/client/coral-admin/src/reducers/moderation.js
index 09a0b39e7..cf270543c 100644
--- a/client/coral-admin/src/reducers/moderation.js
+++ b/client/coral-admin/src/reducers/moderation.js
@@ -19,6 +19,7 @@ export default function moderation (state = initialState, action) {
.merge({
user: Map(action.user),
commentId: action.commentId,
+ showRejectedNote: action.showRejectedNote,
banDialog: true
});
case actions.SET_ACTIVE_TAB:
diff --git a/client/coral-admin/src/translations.json b/client/coral-admin/src/translations.json
index ecc8c4b95..7b8bf2811 100644
--- a/client/coral-admin/src/translations.json
+++ b/client/coral-admin/src/translations.json
@@ -17,7 +17,20 @@
"active": "Active",
"banned": "Banned",
"banned-user": "Banned User",
- "loading": "Loading results"
+ "loading": "Loading results",
+ "flaggedaccounts": "Flagged Usernames",
+ "people": "People",
+ "no-flagged-accounts": "The Account Flags queue is currently empty.",
+ "I don't like this username": "I don't like this username",
+ "This user is impersonating": "Impersonation",
+ "This looks like an ad/marketing": "Spam/Ads",
+ "This username is offensive": "Offensive",
+ "Other": "Other",
+ "ban_user": "Ban User?",
+ "are_you_sure": "Are you sure you would like to ban {0}?",
+ "note": "Note: Banning this user will not let them edit, comment or remove anything.",
+ "cancel": "Cancel",
+ "yes_ban_user": "Yes, Ban User"
},
"modqueue": {
"likes": "likes",
@@ -54,6 +67,7 @@
"copy": "Copy to Clipboard"
},
"configure": {
+ "closed-stream-settings": "Closed Stream Message",
"stream-settings": "Stream Settings",
"moderation-settings": "Moderation Settings",
"tech-settings": "Tech Settings",
@@ -64,9 +78,11 @@
"enable-pre-moderation-text": "Moderators must approve any comment before it is published.",
"require-email-verification": "Require Email Verification",
"require-email-verification-text": "New Users must verify their email before commenting",
- "include-comment-stream": "Include Comment Stream Description for Readers.",
+ "include-comment-stream": "Include Comment Stream Description for Readers",
"include-comment-stream-desc": "Write a message to be added to the top of your comment stream. Pose a topic, include community guidelines, etc.",
"include-text": "Include your text here.",
+ "enable-premod-links": "Pre-Moderate Comments Containing Links",
+ "enable-premod-links-text": "Moderators must approve any comment containing a link before its published.",
"comment-settings": "Settings",
"embed-comment-stream": "Embed Stream",
"banned-word-text": "Comments which contain these words or phrases (not case-sensitive) will be automatically removed from the comment stream. Type a word and press Enter or Tab to add. Optionally paste a comma-separated list.",
@@ -80,7 +96,7 @@
"configure": "Configure",
"community": "Community",
"streams": "Streams",
- "closed-comments-desc": "Write a message for closed threads",
+ "closed-comments-desc": "Write a message to be displayed when when your comment stream is closed and no longer accepting comments.",
"closed-comments-label": "Write a message...",
"hours": "Hours",
"days": "Days",
@@ -88,7 +104,7 @@
"close-after": "Close comments after",
"comment-count-header": "Limit Comment Length",
"comment-count-text-pre": "Comments will be limited to ",
- "comment-count-text-post": " characters.",
+ "comment-count-text-post": " characters",
"comment-count-error": "Please enter a valid number.",
"domain-list-title": "Permitted Domains",
"domain-list-text": "Enter the domains you would like to permit for Talk, e.g. your local, staging and production environments (ex. localhost:3000, staging.domain.com, domain.com)."
@@ -101,7 +117,8 @@
"yes_ban_user": "Yes, Ban User"
},
"suspenduser": {
- "title_0": "We noticed you rejected a {0}",
+ "title": "Suspend a user",
+ "title_0": "We noticed you rejected a username",
"description_0": "Would you like to temporarily ban this user becuase of their {0}? Doing so will temporarily hide their comments until they rewrite their {0}.",
"title_1": "Notify the user of their temporary suspension",
"description_1": "Suspending this user will temporarily disable their account and hide all of their comments on the site.",
@@ -111,10 +128,12 @@
"bio": "bio",
"username": "username",
"email_subject": "Your account has been suspended",
- "email": "Another member of the community recently flagged your {0} for review. Because of its content your {0} was rejected. This means you can no longer comment, like, or flag content until you rewrite your {0}. Please e-mail moderator@newsorg.com if you have any questions or concerns.",
+ "email": "Another member of the community recently flagged your username for review. Because of its content your user was rejected. This means you can no longer comment, like, or flag content until you rewrite your {0}. Please e-mail moderator@newsorg.com if you have any questions or concerns.",
"write_message": "Write a message"
},
"dashboard": {
+ "next-update": "{0} minutes until next update.",
+ "auto-update": "Data automatically updates every five minutes or when you Reload.",
"no_flags": "There have been no flags in the last 5 minutes! Hooray!",
"no_likes": "There have been no likes in the last 5 minutes. All quiet.",
"flags": "Flags",
@@ -156,7 +175,34 @@
"active": "Activa",
"banned": "Suspendido",
"banned-user": "Usuario Suspendido",
- "loading": "Cargando resultados"
+ "loading": "Cargando resultados",
+ "flaggedaccounts": "Nombres de Usuario Reportados",
+ "people": "Gente",
+ "no-flagged-accounts": "No hay ninguna cuenta reportada.",
+ "I don't like this username": "No me gusta ese nombre de usuario",
+ "This user is impersonating": "Suplantación",
+ "This looks like an ad/marketing": "Spam/Propaganda",
+ "This username is offensive": "Ofensivo",
+ "Other": "Otros",
+ "ban_user": "Quieres suspender el Usuario?",
+ "are_you_sure": "Estas segura que quieres suspender a {0}?",
+ "note": "Nota: Suspender a este usuario no le va a permitir borrar ni editar ni comentar.",
+ "cancel": "Cancelar",
+ "yes_ban_user": "Si, Suspendan el usuario"
+ },
+ "suspenduser": {
+ "title": "Suspendiendo un usuario",
+ "title_0": "Esta queriendo suspender un usuario?",
+ "description_0": "Le gustaria suspender a esta usuaria temporarianmente por su nombre de usuario? Si lo hace sus comentarios serán escondidos temporariamente hasta que puedan reescribir su nombre de usuario.",
+ "title_1": "Enviarle una nota al usuario sobre su cuenta suspendida",
+ "description_1": "Si suspende a este usuario, su cuenta va a ser deshabilitada y todos sus comentarios escondidos del sitio.",
+ "no_cancel": "No, cancelar",
+ "yes_suspend": "Si, suspender",
+ "send": "Enviar",
+ "username": "nombre de usuario",
+ "email_subject": "Su cuenta ha sido suspendida temporariamente",
+ "email": "Otra persona de la comunidad recientemente marcó su nombre de usuario para ser revisado. Por su contenido, el nombre de usuario ha sido rechazado. Esto quiere decir que no puede comentar, gustar o marcar contenido hasta que modifique su nombre de usuario. Por favor, envienos un correo a moderator@newsorg.com si tiene alguna pregunta o preocupación",
+ "write_message": "Escribir un mensaje"
},
"modqueue": {
"likes": "gustos",
@@ -180,6 +226,7 @@
"username_flags": ""
},
"configure": {
+ "closed-stream-settings": "Mensaje cuando los comentarios están cerrados en el artículo",
"stream-settings": "Configuración de Comentarios",
"moderation-settings": "Configuración de Moderación",
"tech-settings": "Configuración Technical",
@@ -195,6 +242,8 @@
"include-text": "Incluir tu texto aqui.",
"comment-settings": "Configuración de Comentarios",
"embed-comment-stream": "Colocar Hilo de Comentarios",
+ "enable-premod-links": "Pre-Moderar Commentarios que contienen Links",
+ "enable-premod-links-text": "Los y las Moderadoras deben probar cualquier comentario que contengan links antes de su publicación.",
"wordlist": "Palabras Suspendidas y Suspechosas",
"banned-word-text": "Comentarios que contengan estas palabras o frases, no separadas por comas y en mayusculas o minusuculas, serán automaticamente separadas de los comentarios publicados.",
"suspect-word-text": "Comments which contain these words or phrases (not case-sensitive) will be highlighted in the comment stream. Type a word and press Enter or Tab to add. Optionally paste a comma-separated list.",
@@ -206,7 +255,7 @@
"configure": "Configurar",
"community": "Comunidad",
"streams": "Streams",
- "closed-comments-desc": "Escribe un mensaje para cuando los comentarios se encuentran cerrados",
+ "closed-comments-desc": "Escribe un mensaje que será mostrado cuando los comentarios estén cerrados y no se acepten más comentarios.",
"closed-comments-label": "Escribe un mensaje...",
"never": "Nunca",
"hours": "Horas",
@@ -231,6 +280,8 @@
"yes_ban_user": "Si, Suspendan el usuario"
},
"dashbord": {
+ "next-update": "{0} minutos hasta la siguiente actualización.",
+ "auto-update": "Los datos se actualizan automaticamente cada 5 minutos o cuando Recargas.",
"no_flags": "¡Nadie ha marcado nada en los últimos 5 minutos! ¡Bravo!",
"no_likes": "A nadie le ha gustado algún comentario en los últimos 5 minutos. Todo tranquilo.",
"flags": "Marcados",
diff --git a/client/coral-configure/components/ConfigureCommentStream.js b/client/coral-configure/components/ConfigureCommentStream.js
index d80e487de..348d26f53 100644
--- a/client/coral-configure/components/ConfigureCommentStream.js
+++ b/client/coral-configure/components/ConfigureCommentStream.js
@@ -34,6 +34,18 @@ export default ({handleChange, handleApply, changed, updateQuestionBoxContent, .
description: lang.t('configureCommentStream.enablePremodDescription')
}} />
+
+
+
@@ -88,11 +88,11 @@ class ConfigureStreamContainer extends Component {
handleChange={this.handleChange}
handleApply={this.handleApply}
changed={this.state.changed}
- premodLinks={false}
+ premodLinks={settings.premodLinks}
premod={premod}
updateQuestionBoxContent={this.updateQuestionBoxContent}
- questionBoxEnable={questionBoxEnable}
- questionBoxContent={questionBoxContent}
+ questionBoxEnable={settings.questionBoxEnable}
+ questionBoxContent={settings.questionBoxContent}
/>
{status === 'open' ? 'Close' : 'Open'} Comment Stream
diff --git a/client/coral-embed-stream/src/Comment.css b/client/coral-embed-stream/src/Comment.css
index 7bc1a21f4..6966d82ab 100644
--- a/client/coral-embed-stream/src/Comment.css
+++ b/client/coral-embed-stream/src/Comment.css
@@ -3,5 +3,10 @@
}
.Comment {
-
+
+}
+
+.pendingComment {
+ filter: blur(2px);
+ pointer-events: none;
}
diff --git a/client/coral-embed-stream/src/Comment.js b/client/coral-embed-stream/src/Comment.js
index 72449c906..0a3cdb78b 100644
--- a/client/coral-embed-stream/src/Comment.js
+++ b/client/coral-embed-stream/src/Comment.js
@@ -116,6 +116,7 @@ class Comment extends React.Component {
const dontagree = getActionSummary('DontAgreeActionSummary', comment);
let commentClass = parentId ? `reply ${styles.Reply}` : `comment ${styles.Comment}`;
commentClass += highlighted === comment.id ? ' highlighted-comment' : '';
+ commentClass += comment.id === 'pending' ? ` ${styles.pendingComment}` : '';
// call a function, and if it errors, call addNotification('error', ...) (e.g. to show user a snackbar)
const notifyOnError = (fn, errorToMessage) => async () => {
diff --git a/client/coral-embed-stream/src/Embed.js b/client/coral-embed-stream/src/Embed.js
index 5fc1673a1..0b9bc4fc5 100644
--- a/client/coral-embed-stream/src/Embed.js
+++ b/client/coral-embed-stream/src/Embed.js
@@ -16,7 +16,7 @@ import {queryStream} from 'coral-framework/graphql/queries';
import {postComment, postFlag, postLike, postDontAgree, deleteAction, addCommentTag, removeCommentTag} from 'coral-framework/graphql/mutations';
import {editName} from 'coral-framework/actions/user';
import {updateCountCache} from 'coral-framework/actions/asset';
-import {Notification, notificationActions, authActions, assetActions, pym} from 'coral-framework';
+import {notificationActions, authActions, assetActions, pym} from 'coral-framework';
import Stream from './Stream';
import InfoBox from 'coral-plugin-infobox/InfoBox';
@@ -176,7 +176,7 @@ class Embed extends Component {
refetch={refetch}
setActiveReplyBox={this.setActiveReplyBox}
activeReplyBox={this.state.activeReplyBox}
- addNotification={addNotification}
+ addNotification={this.props.addNotification}
depth={0}
postItem={this.props.postItem}
asset={asset}
@@ -220,11 +220,6 @@ class Embed extends Component {
showSignInDialog={this.props.showSignInDialog}
comments={asset.comments} />