PLT-5910: Fix Channel header menu in Town Square. (#5831)

Этот коммит содержится в:
George Goldberg
2017-03-24 20:42:37 +00:00
коммит произвёл Corey Hulen
родитель 92a1878708
Коммит 2c0c71d460

Просмотреть файл

@@ -499,14 +499,14 @@ export default class ChannelHeader extends React.Component {
</li> </li>
); );
dropdownContents.push(
<li
key='divider-1'
className='divider'
/>
);
if (!ChannelStore.isDefault(channel)) { if (!ChannelStore.isDefault(channel)) {
dropdownContents.push(
<li
key='divider-1'
className='divider'
/>
);
dropdownContents.push( dropdownContents.push(
<li <li
id='channelAddMembers' id='channelAddMembers'
@@ -547,13 +547,6 @@ export default class ChannelHeader extends React.Component {
); );
} }
dropdownContents.push(
<li
key='divider-2'
className='divider'
/>
);
const deleteOption = ( const deleteOption = (
<li <li
id='channelDelete' id='channelDelete'
@@ -577,6 +570,13 @@ export default class ChannelHeader extends React.Component {
); );
if (ChannelUtils.showManagementOptions(channel, isAdmin, isSystemAdmin, isChannelAdmin)) { if (ChannelUtils.showManagementOptions(channel, isAdmin, isSystemAdmin, isChannelAdmin)) {
dropdownContents.push(
<li
key='divider-2'
className='divider'
/>
);
dropdownContents.push( dropdownContents.push(
<li <li
id='channelEditHeader' id='channelEditHeader'
@@ -652,15 +652,15 @@ export default class ChannelHeader extends React.Component {
dropdownContents.push(deleteOption); dropdownContents.push(deleteOption);
} }
dropdownContents.push(
<li
key='divider-3'
className='divider'
/>
);
const canLeave = channel.type === Constants.PRIVATE_CHANNEL ? this.state.userCount > 1 : true; const canLeave = channel.type === Constants.PRIVATE_CHANNEL ? this.state.userCount > 1 : true;
if (!ChannelStore.isDefault(channel) && canLeave) { if (!ChannelStore.isDefault(channel) && canLeave) {
dropdownContents.push(
<li
key='divider-3'
className='divider'
/>
);
dropdownContents.push( dropdownContents.push(
<li <li
id='channelLeave' id='channelLeave'