Minor UI improvements (#4431)
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
137ade29d0
Коммит
cd687aa3df
@@ -393,7 +393,7 @@ export default class ChannelHeader extends React.Component {
|
||||
>
|
||||
<FormattedMessage
|
||||
id='channel_header.channelHeader'
|
||||
defaultMessage='Set Channel Header...'
|
||||
defaultMessage='Edit Channel Header'
|
||||
/>
|
||||
</ToggleModalButton>
|
||||
</li>
|
||||
@@ -417,6 +417,32 @@ export default class ChannelHeader extends React.Component {
|
||||
</li>
|
||||
);
|
||||
|
||||
dropdownContents.push(
|
||||
<li
|
||||
key='notification_preferences'
|
||||
role='presentation'
|
||||
>
|
||||
<ToggleModalButton
|
||||
role='menuitem'
|
||||
dialogType={ChannelNotificationsModal}
|
||||
dialogProps={{
|
||||
channel,
|
||||
channelMember: this.state.memberChannel,
|
||||
currentUser: this.state.currentUser
|
||||
}}
|
||||
>
|
||||
<FormattedMessage
|
||||
id='channel_header.notificationPreferences'
|
||||
defaultMessage='Notification Preferences'
|
||||
/>
|
||||
</ToggleModalButton>
|
||||
</li>
|
||||
);
|
||||
|
||||
dropdownContents.push(
|
||||
<li className='divider'/>
|
||||
);
|
||||
|
||||
if (!ChannelStore.isDefault(channel)) {
|
||||
dropdownContents.push(
|
||||
<li
|
||||
@@ -476,25 +502,7 @@ export default class ChannelHeader extends React.Component {
|
||||
}
|
||||
|
||||
dropdownContents.push(
|
||||
<li
|
||||
key='notification_preferences'
|
||||
role='presentation'
|
||||
>
|
||||
<ToggleModalButton
|
||||
role='menuitem'
|
||||
dialogType={ChannelNotificationsModal}
|
||||
dialogProps={{
|
||||
channel,
|
||||
channelMember: this.state.memberChannel,
|
||||
currentUser: this.state.currentUser
|
||||
}}
|
||||
>
|
||||
<FormattedMessage
|
||||
id='channel_header.notificationPreferences'
|
||||
defaultMessage='Notification Preferences'
|
||||
/>
|
||||
</ToggleModalButton>
|
||||
</li>
|
||||
<li className='divider'/>
|
||||
);
|
||||
|
||||
const deleteOption = (
|
||||
@@ -509,7 +517,7 @@ export default class ChannelHeader extends React.Component {
|
||||
>
|
||||
<FormattedMessage
|
||||
id='channel_header.delete'
|
||||
defaultMessage='Delete {term}...'
|
||||
defaultMessage='Delete {term}'
|
||||
values={{
|
||||
term: (channelTerm)
|
||||
}}
|
||||
@@ -531,7 +539,7 @@ export default class ChannelHeader extends React.Component {
|
||||
>
|
||||
<FormattedMessage
|
||||
id='channel_header.setHeader'
|
||||
defaultMessage='Set {term} Header...'
|
||||
defaultMessage='Edit {term} Header'
|
||||
values={{
|
||||
term: (channelTerm)
|
||||
}}
|
||||
@@ -552,7 +560,7 @@ export default class ChannelHeader extends React.Component {
|
||||
>
|
||||
<FormattedMessage
|
||||
id='channel_header.setPurpose'
|
||||
defaultMessage='Set {term} Purpose...'
|
||||
defaultMessage='Edit {term} Purpose'
|
||||
values={{
|
||||
term: (channelTerm)
|
||||
}}
|
||||
@@ -573,7 +581,7 @@ export default class ChannelHeader extends React.Component {
|
||||
>
|
||||
<FormattedMessage
|
||||
id='channel_header.rename'
|
||||
defaultMessage='Rename {term}...'
|
||||
defaultMessage='Rename {term}'
|
||||
values={{
|
||||
term: (channelTerm)
|
||||
}}
|
||||
@@ -589,6 +597,10 @@ export default class ChannelHeader extends React.Component {
|
||||
dropdownContents.push(deleteOption);
|
||||
}
|
||||
|
||||
dropdownContents.push(
|
||||
<li className='divider'/>
|
||||
);
|
||||
|
||||
const canLeave = channel.type === Constants.PRIVATE_CHANNEL ? this.state.userCount > 1 : true;
|
||||
if (!ChannelStore.isDefault(channel) && canLeave) {
|
||||
dropdownContents.push(
|
||||
|
||||
@@ -69,14 +69,16 @@ export default class DeleteChannelModal extends React.Component {
|
||||
</h4>
|
||||
</Modal.Header>
|
||||
<Modal.Body>
|
||||
<FormattedMessage
|
||||
id='delete_channel.question'
|
||||
defaultMessage='This will delete the channel from the team and make its contents inaccessible for all users. Are you sure you wish to delete the {display_name} {term}?'
|
||||
values={{
|
||||
display_name: this.props.channel.display_name,
|
||||
term: (channelTerm)
|
||||
}}
|
||||
/>
|
||||
<div className='alert alert-danger'>
|
||||
<FormattedMessage
|
||||
id='delete_channel.question'
|
||||
defaultMessage='This will delete the channel from the team and make its contents inaccessible for all users. Are you sure you wish to delete the {display_name} {term}?'
|
||||
values={{
|
||||
display_name: this.props.channel.display_name,
|
||||
term: (channelTerm)
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</Modal.Body>
|
||||
<Modal.Footer>
|
||||
<button
|
||||
|
||||
Ссылка в новой задаче
Block a user