mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Cleaned up how channel intro messages display set channel header button
This commit is contained in:
@@ -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 + '.'}<br/>
|
||||
{'Direct messages and files shared here are not shown to people outside this area.'}
|
||||
</p>
|
||||
<ToggleModalButton
|
||||
className='intro-links'
|
||||
dialogType={EditChannelHeaderModal}
|
||||
dialogProps={{channel}}
|
||||
>
|
||||
<i className='fa fa-pencil'></i>{'Set a header'}
|
||||
</ToggleModalButton>
|
||||
{createSetHeaderButton(channel)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -76,13 +71,7 @@ export function createOffTopicIntroMessage(channel, showInviteModal) {
|
||||
{'This is the start of ' + channel.display_name + ', a channel for non-work-related conversations.'}
|
||||
<br/>
|
||||
</p>
|
||||
<ToggleModalButton
|
||||
className='intro-links'
|
||||
dialogType={EditChannelHeaderModal}
|
||||
dialogProps={{channel}}
|
||||
>
|
||||
<i className='fa fa-pencil'></i>{'Set a header'}
|
||||
</ToggleModalButton>
|
||||
{createSetHeaderButton(channel)}
|
||||
<a
|
||||
href='#'
|
||||
className='intro-links'
|
||||
@@ -131,13 +120,7 @@ export function createDefaultIntroMessage(channel) {
|
||||
{'This is the first channel teammates see when they sign up - use it for posting updates everyone needs to know.'}
|
||||
</p>
|
||||
{inviteModalLink}
|
||||
<ToggleModalButton
|
||||
className='intro-links'
|
||||
dialogType={EditChannelHeaderModal}
|
||||
dialogProps={{channel}}
|
||||
>
|
||||
<i className='fa fa-pencil'></i>{'Set a header'}
|
||||
</ToggleModalButton>
|
||||
{createSetHeaderButton(channel)}
|
||||
<br/>
|
||||
</div>
|
||||
);
|
||||
@@ -182,13 +165,7 @@ export function createStandardIntroMessage(channel, showInviteModal) {
|
||||
{memberMessage}
|
||||
<br/>
|
||||
</p>
|
||||
<ToggleModalButton
|
||||
className='intro-links'
|
||||
dialogType={EditChannelHeaderModal}
|
||||
dialogProps={{channel}}
|
||||
>
|
||||
<i className='fa fa-pencil'></i>{'Set a header'}
|
||||
</ToggleModalButton>
|
||||
{createSetHeaderButton(channel)}
|
||||
<a
|
||||
className='intro-links'
|
||||
href='#'
|
||||
@@ -199,3 +176,15 @@ export function createStandardIntroMessage(channel, showInviteModal) {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function createSetHeaderButton(channel) {
|
||||
return (
|
||||
<ToggleModalButton
|
||||
className='intro-links'
|
||||
dialogType={EditChannelHeaderModal}
|
||||
dialogProps={{channel}}
|
||||
>
|
||||
<i className='fa fa-pencil'></i>{'Set a header'}
|
||||
</ToggleModalButton>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user