From 782709aa56d8e3ad9d65cd05f33640887d771b89 Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Wed, 11 Nov 2015 12:53:18 -0500 Subject: Fix channel invite button on channel intro message and fix empty channel invite modal. --- web/react/utils/channel_intro_mssages.jsx | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'web/react/utils') diff --git a/web/react/utils/channel_intro_mssages.jsx b/web/react/utils/channel_intro_mssages.jsx index 161c79761..87dc680c1 100644 --- a/web/react/utils/channel_intro_mssages.jsx +++ b/web/react/utils/channel_intro_mssages.jsx @@ -9,15 +9,15 @@ const ChannelStore = require('../stores/channel_store.jsx'); const Constants = require('../utils/constants.jsx'); const TeamStore = require('../stores/team_store.jsx'); -export function createChannelIntroMessage(channel) { +export function createChannelIntroMessage(channel, showInviteModal) { if (channel.type === 'D') { - return createDMIntroMessage(channel); + return createDMIntroMessage(channel, showInviteModal); } else if (ChannelStore.isDefault(channel)) { return createDefaultIntroMessage(channel); } else if (channel.name === Constants.OFFTOPIC_CHANNEL) { - return createOffTopicIntroMessage(channel); + return createOffTopicIntroMessage(channel, showInviteModal); } else if (channel.type === 'O' || channel.type === 'P') { - return createStandardIntroMessage(channel); + return createStandardIntroMessage(channel, showInviteModal); } } @@ -71,7 +71,7 @@ export function createDMIntroMessage(channel) { ); } -export function createOffTopicIntroMessage(channel) { +export function createOffTopicIntroMessage(channel, showInviteModal) { return (

{'Beginning of ' + channel.display_name}

@@ -91,10 +91,9 @@ export function createOffTopicIntroMessage(channel) { {'Set a header'} {'Invite others to this channel'} @@ -155,7 +154,7 @@ export function createDefaultIntroMessage(channel) { ); } -export function createStandardIntroMessage(channel) { +export function createStandardIntroMessage(channel, showInviteModal) { var uiName = channel.display_name; var creatorName = ''; @@ -206,14 +205,12 @@ export function createStandardIntroMessage(channel) { {'Set a header'} {'Invite others to this ' + uiType} -
); } -- cgit v1.2.3-1-g7c22 From b42404dcba657640185badd945afa74ce245ce94 Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Wed, 11 Nov 2015 12:54:57 -0500 Subject: Remove unneed argument --- web/react/utils/channel_intro_mssages.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web/react/utils') diff --git a/web/react/utils/channel_intro_mssages.jsx b/web/react/utils/channel_intro_mssages.jsx index 87dc680c1..8a3acc0bc 100644 --- a/web/react/utils/channel_intro_mssages.jsx +++ b/web/react/utils/channel_intro_mssages.jsx @@ -11,7 +11,7 @@ const TeamStore = require('../stores/team_store.jsx'); export function createChannelIntroMessage(channel, showInviteModal) { if (channel.type === 'D') { - return createDMIntroMessage(channel, showInviteModal); + return createDMIntroMessage(channel); } else if (ChannelStore.isDefault(channel)) { return createDefaultIntroMessage(channel); } else if (channel.name === Constants.OFFTOPIC_CHANNEL) { -- cgit v1.2.3-1-g7c22 From 72c7e066446b7abdce74d74a9aee60c4eac0935c Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Wed, 11 Nov 2015 12:56:04 -0500 Subject: Remove unneed role --- web/react/utils/channel_intro_mssages.jsx | 2 -- 1 file changed, 2 deletions(-) (limited to 'web/react/utils') diff --git a/web/react/utils/channel_intro_mssages.jsx b/web/react/utils/channel_intro_mssages.jsx index 8a3acc0bc..f27e23a82 100644 --- a/web/react/utils/channel_intro_mssages.jsx +++ b/web/react/utils/channel_intro_mssages.jsx @@ -91,7 +91,6 @@ export function createOffTopicIntroMessage(channel, showInviteModal) { {'Set a header'} @@ -205,7 +204,6 @@ export function createStandardIntroMessage(channel, showInviteModal) { {'Set a header'} -- cgit v1.2.3-1-g7c22