From 7df8eaf29aa59467236c1b434bc09ccc33cd011f Mon Sep 17 00:00:00 2001 From: Carlos Tadeu Panato Junior Date: Mon, 14 Nov 2016 13:40:37 +0100 Subject: Update introduction message at top of channel/private groups (#4508) * Update introduction message at top of channel/private groups * fix grammar --- webapp/i18n/en.json | 3 ++- webapp/utils/channel_intro_messages.jsx | 29 +++++++++++++++++++++++------ 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/webapp/i18n/en.json b/webapp/i18n/en.json index 85751f699..532b44c23 100644 --- a/webapp/i18n/en.json +++ b/webapp/i18n/en.json @@ -1411,7 +1411,8 @@ "intro_messages.anyMember": " Any member can join and read this channel.", "intro_messages.beginning": "Beginning of {name}", "intro_messages.channel": "channel", - "intro_messages.creator": "This is the start of the {name} {type}, created by {creator} on {date}", + "intro_messages.creator": "This is the start of the {name} {type}, created by {creator} on {date}.", + "intro_messages.purpose": " This {type}'s purpose is: {purpose}.", "intro_messages.default": "

Beginning of {display_name}

Welcome to {display_name}!

This is the first channel teammates see when they sign up - use it for posting updates everyone needs to know.

", "intro_messages.group": "private group", "intro_messages.invite": "Invite others to this {type}", diff --git a/webapp/utils/channel_intro_messages.jsx b/webapp/utils/channel_intro_messages.jsx index 899e4e5a4..36d8cdb2a 100644 --- a/webapp/utils/channel_intro_messages.jsx +++ b/webapp/utils/channel_intro_messages.jsx @@ -147,10 +147,10 @@ export function createDefaultIntroMessage(channel, centeredIntro) { export function createStandardIntroMessage(channel, centeredIntro) { var uiName = channel.display_name; - var creatorName = ''; - + var creatorName = Utils.displayUsername(channel.creator_id); var uiType; var memberMessage; + if (channel.type === 'P') { uiType = ( - + + ); + } + + var purposeMessage = ''; + if (channel.purpose && channel.purpose !== '') { + purposeMessage = ( + + @@ -232,6 +248,7 @@ export function createStandardIntroMessage(channel, centeredIntro) {

{createMessage} {memberMessage} + {purposeMessage}

{createInviteChannelMemberButton(channel, uiType)} -- cgit v1.2.3-1-g7c22