From 6237631a85b79311a60b87df423abbdce56c7876 Mon Sep 17 00:00:00 2001 From: hmhealey Date: Mon, 16 Nov 2015 12:08:05 -0500 Subject: Ported EditChannelModal to React-Bootstrap --- web/react/utils/channel_intro_mssages.jsx | 51 +++++++++++-------------------- web/react/utils/utils.jsx | 17 +++-------- 2 files changed, 22 insertions(+), 46 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 0bbc7366e..4047ec028 100644 --- a/web/react/utils/channel_intro_mssages.jsx +++ b/web/react/utils/channel_intro_mssages.jsx @@ -1,9 +1,10 @@ - // Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. import * as Utils from './utils.jsx'; +import EditChannelModal from '../components/edit_channel_modal.jsx'; import InviteMemberModal from '../components/invite_member_modal.jsx'; +import ToggleModalButton from '../components/toggle_modal_button.jsx'; import UserProfile from '../components/user_profile.jsx'; import ChannelStore from '../stores/channel_store.jsx'; import Constants from '../utils/constants.jsx'; @@ -49,17 +50,13 @@ export function createDMIntroMessage(channel) { {'This is the start of your direct message history with ' + teammateName + '.'}
{'Direct messages and files shared here are not shown to people outside this area.'}

- {'Set a header'} - + ); } @@ -79,17 +76,13 @@ export function createOffTopicIntroMessage(channel, showInviteModal) { {'This is the start of ' + channel.display_name + ', a channel for non-work-related conversations.'}

- {'Set a header'} - + {inviteModalLink} - {'Set a header'} - +
); @@ -193,17 +182,13 @@ export function createStandardIntroMessage(channel, showInviteModal) { {memberMessage}

- {'Set a header'} - + Date: Mon, 16 Nov 2015 12:14:03 -0500 Subject: Renamed EditChannelModal to EditChannelHeaderModal --- web/react/utils/channel_intro_mssages.jsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 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 4047ec028..268e4f695 100644 --- a/web/react/utils/channel_intro_mssages.jsx +++ b/web/react/utils/channel_intro_mssages.jsx @@ -2,7 +2,7 @@ // See License.txt for license information. import * as Utils from './utils.jsx'; -import EditChannelModal from '../components/edit_channel_modal.jsx'; +import EditChannelHeaderModal from '../components/edit_channel_header_modal.jsx'; import InviteMemberModal from '../components/invite_member_modal.jsx'; import ToggleModalButton from '../components/toggle_modal_button.jsx'; import UserProfile from '../components/user_profile.jsx'; @@ -52,7 +52,7 @@ export function createDMIntroMessage(channel) {

{'Set a header'} @@ -78,7 +78,7 @@ export function createOffTopicIntroMessage(channel, showInviteModal) {

{'Set a header'} @@ -133,7 +133,7 @@ export function createDefaultIntroMessage(channel) { {inviteModalLink} {'Set a header'} @@ -184,7 +184,7 @@ export function createStandardIntroMessage(channel, showInviteModal) {

{'Set a header'} -- cgit v1.2.3-1-g7c22 From e8f6dd2f3359feceeae9923366c5ec80a6ab1d73 Mon Sep 17 00:00:00 2001 From: hmhealey Date: Tue, 17 Nov 2015 09:17:00 -0500 Subject: Cleaned up how channel intro messages display set channel header button --- web/react/utils/channel_intro_mssages.jsx | 45 ++++++++++++------------------- 1 file changed, 17 insertions(+), 28 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 268e4f695..72328f812 100644 --- a/web/react/utils/channel_intro_mssages.jsx +++ b/web/react/utils/channel_intro_mssages.jsx @@ -3,6 +3,7 @@ import * as Utils from './utils.jsx'; import EditChannelHeaderModal from '../components/edit_channel_header_modal.jsx'; +import GetTeamInviteLinkModal from '../components/get_team_invite_link_modal.jsx'; import InviteMemberModal from '../components/invite_member_modal.jsx'; import ToggleModalButton from '../components/toggle_modal_button.jsx'; import UserProfile from '../components/user_profile.jsx'; @@ -50,13 +51,7 @@ export function createDMIntroMessage(channel) { {'This is the start of your direct message history with ' + teammateName + '.'}
{'Direct messages and files shared here are not shown to people outside this area.'}

- - {'Set a header'} - + {createSetHeaderButton(channel)} ); } @@ -76,13 +71,7 @@ export function createOffTopicIntroMessage(channel, showInviteModal) { {'This is the start of ' + channel.display_name + ', a channel for non-work-related conversations.'}

- - {'Set a header'} - + {createSetHeaderButton(channel)}
{inviteModalLink} - - {'Set a header'} - + {createSetHeaderButton(channel)}
); @@ -182,13 +165,7 @@ export function createStandardIntroMessage(channel, showInviteModal) { {memberMessage}

- - {'Set a header'} - + {createSetHeaderButton(channel)}
); } + +function createSetHeaderButton(channel) { + return ( + + {'Set a header'} + + ); +} -- cgit v1.2.3-1-g7c22 From b20144db8ec18630cf21cdc4e47c5681f2a67aa0 Mon Sep 17 00:00:00 2001 From: hmhealey Date: Thu, 19 Nov 2015 11:59:59 -0500 Subject: Converted GetLinkModal to React-Bootstrap and added GetTeamInviteLinkModal --- web/react/utils/channel_intro_mssages.jsx | 5 +---- web/react/utils/constants.jsx | 3 ++- 2 files changed, 3 insertions(+), 5 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 72328f812..70f3e9534 100644 --- a/web/react/utils/channel_intro_mssages.jsx +++ b/web/react/utils/channel_intro_mssages.jsx @@ -101,10 +101,7 @@ export function createDefaultIntroMessage(channel) { {'Invite others to this team'} diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx index 1ac9a1b98..6281813e9 100644 --- a/web/react/utils/constants.jsx +++ b/web/react/utils/constants.jsx @@ -48,7 +48,8 @@ export default { TOGGLE_IMPORT_THEME_MODAL: null, TOGGLE_INVITE_MEMBER_MODAL: null, - TOGGLE_DELETE_POST_MODAL: null + TOGGLE_DELETE_POST_MODAL: null, + TOGGLE_GET_TEAM_INVITE_LINK_MODAL: null }), PayloadSources: keyMirror({ -- cgit v1.2.3-1-g7c22 From 388dc6c89c62133c3c5fd1c3bb5ec0327cf5be6d Mon Sep 17 00:00:00 2001 From: hmhealey Date: Mon, 23 Nov 2015 10:52:52 -0500 Subject: Moved show static methods out of modals and into EventHelpers --- web/react/utils/channel_intro_mssages.jsx | 7 +++---- 1 file changed, 3 insertions(+), 4 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 70f3e9534..6f83778c9 100644 --- a/web/react/utils/channel_intro_mssages.jsx +++ b/web/react/utils/channel_intro_mssages.jsx @@ -3,13 +3,12 @@ import * as Utils from './utils.jsx'; import EditChannelHeaderModal from '../components/edit_channel_header_modal.jsx'; -import GetTeamInviteLinkModal from '../components/get_team_invite_link_modal.jsx'; -import InviteMemberModal from '../components/invite_member_modal.jsx'; import ToggleModalButton from '../components/toggle_modal_button.jsx'; import UserProfile from '../components/user_profile.jsx'; import ChannelStore from '../stores/channel_store.jsx'; import Constants from '../utils/constants.jsx'; import TeamStore from '../stores/team_store.jsx'; +import * as EventHelpers from '../dispatcher/event_helpers.jsx'; export function createChannelIntroMessage(channel, showInviteModal) { if (channel.type === 'D') { @@ -91,7 +90,7 @@ export function createDefaultIntroMessage(channel) { {'Invite others to this team'} @@ -101,7 +100,7 @@ export function createDefaultIntroMessage(channel) { {'Invite others to this team'} -- cgit v1.2.3-1-g7c22