From 3d56d9b2411fdf6db6228dee5dab3fad377a31c4 Mon Sep 17 00:00:00 2001 From: nickago Date: Mon, 13 Jul 2015 14:56:54 -0700 Subject: Add processing for messageless image posts w/ pluralization --- web/react/components/post_body.jsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'web/react') diff --git a/web/react/components/post_body.jsx b/web/react/components/post_body.jsx index 7d5ef4d33..2febcfa04 100644 --- a/web/react/components/post_body.jsx +++ b/web/react/components/post_body.jsx @@ -71,11 +71,22 @@ module.exports = React.createClass({ name = {profile.username}; } - var message = parentPost.message; + var message = "" + if(parentPost.message) { + message = utils.replaceHtmlEntities(parentPost.message) + } else if (parentPost.filenames.length) { + message = 2) { + message += " plus " + (parentPost.filenames.length - 1) + " other files"; + } + } comment = (

- Commented on {name}{apostrophe} message: {utils.replaceHtmlEntities(message)} + Commented on {name}{apostrophe} message: {message}

); -- cgit v1.2.3-1-g7c22 From fa4ac0c7890aa148122407feb2575470336099e1 Mon Sep 17 00:00:00 2001 From: nickago Date: Tue, 14 Jul 2015 12:08:00 -0700 Subject: Fixed minor typo --- web/react/components/post_body.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web/react') diff --git a/web/react/components/post_body.jsx b/web/react/components/post_body.jsx index 2febcfa04..5f7dbe6c9 100644 --- a/web/react/components/post_body.jsx +++ b/web/react/components/post_body.jsx @@ -75,7 +75,7 @@ module.exports = React.createClass({ if(parentPost.message) { message = utils.replaceHtmlEntities(parentPost.message) } else if (parentPost.filenames.length) { - message =