Improving about modal and colon issue with webhooks (#3343)

Updating word break

Updating improvements for about modal
Этот коммит содержится в:
Asaad Mahmood
2016-06-16 17:42:38 +05:00
коммит произвёл Harrison Healey
родитель e1703d8800
Коммит 4e38796e69
8 изменённых файлов: 66 добавлений и 56 удалений

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

@@ -20,8 +20,11 @@ export default class ChannelInfoModal extends React.Component {
return false; return false;
} }
render() { render() {
let channel = this.props.channel; let channel = this.props.channel;
let channelIcon;
if (!channel) { if (!channel) {
const notFound = Utils.localizeMessage('channel_info.notFound', 'No Channel Found'); const notFound = Utils.localizeMessage('channel_info.notFound', 'No Channel Found');
@@ -33,68 +36,58 @@ export default class ChannelInfoModal extends React.Component {
}; };
} }
if (channel.type === 'O') {
channelIcon = (<span className='fa fa-globe'/>);
} else if (channel.type === 'P') {
channelIcon = (<span className='fa fa-lock'/>);
}
const channelURL = Utils.getTeamURLFromAddressBar() + '/channels/' + channel.name; const channelURL = Utils.getTeamURLFromAddressBar() + '/channels/' + channel.name;
return ( return (
<Modal <Modal
dialogClassName='about-modal'
show={this.props.show} show={this.props.show}
onHide={this.props.onHide} onHide={this.props.onHide}
> >
<Modal.Header closeButtton={true}> <Modal.Header closeButton={true}>
<Modal.Title> <Modal.Title>
{channel.display_name} <FormattedMessage
id='channel_info.about'
defaultMessage='About'
/>
<strong>{channelIcon}{channel.display_name}</strong>
</Modal.Title> </Modal.Title>
</Modal.Header> </Modal.Header>
<Modal.Body ref='modalBody'> <Modal.Body ref='modalBody'>
<div className='row form-group'> <div className='form-group'>
<div className='col-sm-3 info__label'> <div className='info__label'>
<FormattedMessage
id='channel_info.name'
defaultMessage='Channel Name:'
/>
</div>
<div className='col-sm-9'>{channel.display_name}</div>
</div>
<div className='row form-group'>
<div className='col-sm-3 info__label'>
<FormattedMessage
id='channel_info.url'
defaultMessage='Channel URL:'
/>
</div>
<div className='col-sm-9'>{channelURL}</div>
</div>
<div className='row form-group'>
<div className='col-sm-3 info__label'>
<FormattedMessage
id='channel_info.id'
defaultMessage='Channel ID:'
/>
</div>
<div className='col-sm-9'>{channel.id}</div>
</div>
<div className='row'>
<div className='col-sm-3 info__label'>
<FormattedMessage <FormattedMessage
id='channel_info.purpose' id='channel_info.purpose'
defaultMessage='Channel Purpose:' defaultMessage='Purpose:'
/> />
</div> </div>
<div className='col-sm-9'>{channel.purpose}</div> <div className='info__value'>{channel.purpose}</div>
</div>
<div className='form-group'>
<div className='info__label'>
<FormattedMessage
id='channel_info.url'
defaultMessage='URL:'
/>
</div>
<div className='info__value'>{channelURL}</div>
</div>
<div className='about-modal__hash form-group padding-top x2'>
<p>
<FormattedMessage
id='channel_info.id'
defaultMessage='ID: '
/>
{channel.id}
</p>
</div> </div>
</Modal.Body> </Modal.Body>
<Modal.Footer>
<button
type='button'
className='btn btn-default'
onClick={this.props.onHide}
>
<FormattedMessage
id='channel_info.close'
defaultMessage='Close'
/>
</button>
</Modal.Footer>
</Modal> </Modal>
); );
} }

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

@@ -52,7 +52,7 @@ export default class PostHeader extends React.Component {
} }
if (this.props.compactDisplay) { if (this.props.compactDisplay) {
colon = (<strong>{':'}</strong>); colon = (<strong className='colon'>{':'}</strong>);
} }
return ( return (

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

@@ -64,7 +64,7 @@ export default class UserProfile extends React.Component {
} }
if (this.props.disablePopover) { if (this.props.disablePopover) {
return <div>{name}</div>; return <div className='user-popover'>{name}</div>;
} }
var dataContent = []; var dataContent = [];

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

@@ -684,11 +684,12 @@
"channel_header.setPurpose": "Set {term} Purpose...", "channel_header.setPurpose": "Set {term} Purpose...",
"channel_header.viewInfo": "View Info", "channel_header.viewInfo": "View Info",
"channel_info.close": "Close", "channel_info.close": "Close",
"channel_info.id": "Channel ID:", "channel_info.about": "About",
"channel_info.name": "Channel Name:", "channel_info.id": "ID: ",
"channel_info.name": "Name:",
"channel_info.notFound": "No Channel Found", "channel_info.notFound": "No Channel Found",
"channel_info.purpose": "Channel Purpose:", "channel_info.purpose": "Purpose:",
"channel_info.url": "Channel URL:", "channel_info.url": "URL:",
"channel_invite.add": " Add", "channel_invite.add": " Add",
"channel_invite.addNewMembers": "Add New Members to ", "channel_invite.addNewMembers": "Add New Members to ",
"channel_invite.close": "Close", "channel_invite.close": "Close",

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

@@ -89,9 +89,15 @@
} }
.info__label { .info__label {
@include opacity(.5);
font-size: .9em;
font-weight: 600; font-weight: 600;
padding-right: 0; margin-bottom: 3px;
text-align: right; }
.info__value {
padding-left: 10px;
word-break: break-word;
} }
.team-member-list { .team-member-list {

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

@@ -768,7 +768,7 @@ body.ios {
white-space: nowrap; white-space: nowrap;
} }
strong { .colon {
display: none; display: none;
font-weight: 900; font-weight: 900;
margin-left: 2px; margin-left: 2px;
@@ -1118,7 +1118,7 @@ body.ios {
font-family: inherit; font-family: inherit;
font-size: 11px; font-size: 11px;
font-weight: 600; font-weight: 600;
margin: 0 0 0 -4px; margin: 0 10px 0 -4px;
padding: 2px 4px; padding: 2px 4px;
} }

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

@@ -122,7 +122,7 @@
z-index: 1; z-index: 1;
} }
strong { .colon {
display: inline; display: inline;
} }

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

@@ -20,12 +20,22 @@
color: inherit; color: inherit;
font-size: 16px; font-size: 16px;
} }
.fa {
margin: 0 4px 0 8px;
}
} }
.modal-body { .modal-body {
padding: 20px 25px 5px; padding: 20px 25px 5px;
} }
&.large {
.modal-body {
padding-bottom: 20px;
}
}
.about-modal__content { .about-modal__content {
@include clearfix; @include clearfix;
@include display-flex; @include display-flex;