diff options
Diffstat (limited to 'web/react/components')
17 files changed, 118 insertions, 94 deletions
diff --git a/web/react/components/channel_members_modal.jsx b/web/react/components/channel_members_modal.jsx index 3ec93a616..dc8e3baaf 100644 --- a/web/react/components/channel_members_modal.jsx +++ b/web/react/components/channel_members_modal.jsx @@ -178,7 +178,6 @@ export default class ChannelMembersModal extends React.Component { this.props.onModalDismissed(); }} > - <i className='glyphicon glyphicon-envelope'/> <FormattedMessage id='channel_members_modal.addNew' defaultMessage=' Add New Members' diff --git a/web/react/components/file_attachment.jsx b/web/react/components/file_attachment.jsx index 6aeae638f..c719c6c7d 100644 --- a/web/react/components/file_attachment.jsx +++ b/web/react/components/file_attachment.jsx @@ -151,9 +151,9 @@ class FileAttachment extends React.Component { this.setState({fileSize: parseInt(data.size, 10)}); } }.bind(this), - function error() { - // Do nothing - } + function error() { + // Do nothing + } ); } else { fileSizeString = utils.fileSizeToString(this.state.fileSize); diff --git a/web/react/components/more_channels.jsx b/web/react/components/more_channels.jsx index db61e5f49..3309ef52e 100644 --- a/web/react/components/more_channels.jsx +++ b/web/react/components/more_channels.jsx @@ -1,7 +1,7 @@ // Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. -import * as utils from '../utils/utils.jsx'; +import * as Utils from '../utils/utils.jsx'; import * as client from '../utils/client.jsx'; import * as AsyncClient from '../utils/async_client.jsx'; import ChannelStore from '../stores/channel_store.jsx'; @@ -24,6 +24,7 @@ export default class MoreChannels extends React.Component { this.onListenerChange = this.onListenerChange.bind(this); this.handleJoin = this.handleJoin.bind(this); this.handleNewChannel = this.handleNewChannel.bind(this); + this.createChannelRow = this.createChannelRow.bind(this); var initState = getStateFromStores(); initState.channelType = ''; @@ -48,7 +49,7 @@ export default class MoreChannels extends React.Component { } onListenerChange() { var newState = getStateFromStores(); - if (!utils.areObjectsEqual(newState.channels, this.state.channels)) { + if (!Utils.areObjectsEqual(newState.channels, this.state.channels)) { this.setState(newState); } } @@ -58,7 +59,7 @@ export default class MoreChannels extends React.Component { () => { $(ReactDOM.findDOMNode(this.refs.modal)).modal('hide'); AsyncClient.getChannel(channel.id); - utils.switchChannel(channel); + Utils.switchChannel(channel); this.setState({joiningChannel: -1}); }, (err) => { @@ -70,13 +71,54 @@ export default class MoreChannels extends React.Component { $(ReactDOM.findDOMNode(this.refs.modal)).modal('hide'); this.setState({showNewChannelModal: true}); } + createChannelRow(channel, index) { + let joinButton; + if (this.state.joiningChannel === index) { + joinButton = ( + <img + className='join-channel-loading-gif' + src='/static/images/load.gif' + /> + ); + } else { + joinButton = ( + <button + onClick={this.handleJoin.bind(self, channel, index)} + className='btn btn-primary' + > + <FormattedMessage + id='more_channels.join' + defaultMessage='Join' + /> + </button> + ); + } + + return ( + <tr key={channel.id}> + <td className='more-row'> + <div className='more-details'> + <p className='more-name'>{channel.display_name}</p> + <p className='more-description'>{channel.purpose}</p> + </div> + <div className='more-actions'> + {joinButton} + </div> + </td> + </tr> + ); + } render() { + let maxHeight = 1000; + if (Utils.windowHeight() <= 1200) { + maxHeight = Utils.windowHeight() - 300; + } + var serverError; if (this.state.serverError) { serverError = <div className='form-group has-error'><label className='control-label'>{this.state.serverError}</label></div>; } - var self = this; var moreChannels; if (this.state.channels != null) { @@ -87,59 +129,25 @@ export default class MoreChannels extends React.Component { moreChannels = ( <table className='more-table table'> <tbody> - {channels.map(function cMap(channel, index) { - var joinButton; - if (self.state.joiningChannel === index) { - joinButton = ( - <img - className='join-channel-loading-gif' - src='/static/images/load.gif' - /> - ); - } else { - joinButton = ( - <button - onClick={self.handleJoin.bind(self, channel, index)} - className='btn btn-primary' - > - <FormattedMessage - id='more_channels.join' - defaultMessage='Join' - /> - </button> - ); - } - - return ( - <tr key={channel.id}> - <td> - <p className='more-name'>{channel.display_name}</p> - <p className='more-description'>{channel.purpose}</p> - </td> - <td className='td--action'> - {joinButton} - </td> - </tr> - ); - })} + {channels.map(this.createChannelRow)} </tbody> </table> ); } else { moreChannels = ( <div className='no-channel-message'> - <p className='primary-message'> - <FormattedMessage - id='more_channels.noMore' - defaultMessage='No more channels to join' - /> - </p> - <p className='secondary-message'> - <FormattedMessage - id='more_channels.createClick' - defaultMessage="Click 'Create New Channel' to make a new one" - /> - </p> + <p className='primary-message'> + <FormattedMessage + id='more_channels.noMore' + defaultMessage='No more channels to join' + /> + </p> + <p className='secondary-message'> + <FormattedMessage + id='more_channels.createClick' + defaultMessage="Click 'Create New Channel' to make a new one" + /> + </p> </div> ); } @@ -192,7 +200,10 @@ export default class MoreChannels extends React.Component { onModalDismissed={() => this.setState({showNewChannelModal: false})} /> </div> - <div className='modal-body'> + <div + className='modal-body' + style={{maxHeight}} + > {moreChannels} {serverError} </div> diff --git a/web/react/components/settings_sidebar.jsx b/web/react/components/settings_sidebar.jsx index 90c0e8435..da8001f6f 100644 --- a/web/react/components/settings_sidebar.jsx +++ b/web/react/components/settings_sidebar.jsx @@ -4,10 +4,6 @@ import * as Utils from '../utils/utils.jsx'; export default class SettingsSidebar extends React.Component { - componentDidUpdate() { - $('.settings-modal').find('.modal-body').scrollTop(0); - $('.settings-modal').find('.modal-body').perfectScrollbar('update'); - } constructor(props) { super(props); diff --git a/web/react/components/team_general_tab.jsx b/web/react/components/team_general_tab.jsx index c1b2a2e7f..ef7410b2f 100644 --- a/web/react/components/team_general_tab.jsx +++ b/web/react/components/team_general_tab.jsx @@ -611,7 +611,9 @@ class GeneralTab extends React.Component { className='modal-title' ref='title' > - <i className='modal-back'></i> + <div className='modal-back'> + <i className='fa fa-angle-left'></i> + </div> <FormattedMessage id='general_tab.title' defaultMessage='General Settings' diff --git a/web/react/components/team_import_tab.jsx b/web/react/components/team_import_tab.jsx index 828e9fc4e..c9a8afe6c 100644 --- a/web/react/components/team_import_tab.jsx +++ b/web/react/components/team_import_tab.jsx @@ -131,7 +131,10 @@ class TeamImportTab extends React.Component { <h4 className='modal-title' ref='title' - ><i className='modal-back'></i> + > + <div className='modal-back'> + <i className='fa fa-angle-left'></i> + </div> <FormattedMessage id='team_import_tab.import' defaultMessage='Import' diff --git a/web/react/components/team_members_dropdown.jsx b/web/react/components/team_members_dropdown.jsx index 8aacba8ca..cd7585d94 100644 --- a/web/react/components/team_members_dropdown.jsx +++ b/web/react/components/team_members_dropdown.jsx @@ -308,8 +308,8 @@ export default class TeamMembersDropdown extends React.Component { data-toggle='dropdown' aria-expanded='true' > - <span className='fa fa-pencil'></span> <span>{currentRoles} </span> + <span className='fa fa-chevron-down'></span> </a> <ul className='dropdown-menu member-menu' diff --git a/web/react/components/team_settings_modal.jsx b/web/react/components/team_settings_modal.jsx index d517f92fb..bef3ebf24 100644 --- a/web/react/components/team_settings_modal.jsx +++ b/web/react/components/team_settings_modal.jsx @@ -91,7 +91,7 @@ class TeamSettingsModal extends React.Component { /> </h4> </div> - <div className='modal-body'> + <div className='modal-body settings-modal__body'> <div className='settings-table'> <div className='settings-links'> <SettingsSidebar diff --git a/web/react/components/textbox.jsx b/web/react/components/textbox.jsx index c119abcbc..46900e436 100644 --- a/web/react/components/textbox.jsx +++ b/web/react/components/textbox.jsx @@ -155,7 +155,7 @@ export default class Textbox extends React.Component { let helpText = ( <div - style={{visibility: hasText ? 'visible' : 'hidden', opacity: hasText ? '1' : '0'}} + style={{visibility: hasText ? 'visible' : 'hidden', opacity: hasText ? '0.5' : '0'}} className='help_format_text' > <b> diff --git a/web/react/components/user_list_row.jsx b/web/react/components/user_list_row.jsx index d75078619..d8442e770 100644 --- a/web/react/components/user_list_row.jsx +++ b/web/react/components/user_list_row.jsx @@ -28,7 +28,6 @@ export default function UserListRow({user, actions}) { <tr> <td key={user.id} - className='direct-channel' style={{display: 'flex'}} > <img diff --git a/web/react/components/user_settings/user_settings_advanced.jsx b/web/react/components/user_settings/user_settings_advanced.jsx index efaf63ada..cdaa5fd8a 100644 --- a/web/react/components/user_settings/user_settings_advanced.jsx +++ b/web/react/components/user_settings/user_settings_advanced.jsx @@ -300,10 +300,12 @@ class AdvancedSettingsDisplay extends React.Component { className='modal-title' ref='title' > - <i - className='modal-back' - onClick={this.props.collapseModal} - /> + <div className='modal-back'> + <i + className='fa fa-angle-left' + onClick={this.props.collapseModal} + /> + </div> <FormattedMessage id='user.settings.advance.title' defaultMessage='Advanced Settings' diff --git a/web/react/components/user_settings/user_settings_developer.jsx b/web/react/components/user_settings/user_settings_developer.jsx index 5868e0ad3..0acfd4a16 100644 --- a/web/react/components/user_settings/user_settings_developer.jsx +++ b/web/react/components/user_settings/user_settings_developer.jsx @@ -94,10 +94,12 @@ class DeveloperTab extends React.Component { className='modal-title' ref='title' > - <i - className='modal-back' - onClick={this.props.collapseModal} - /> + <div className='modal-back'> + <i + className='fa fa-angle-left' + onClick={this.props.collapseModal} + /> + </div> <FormattedMessage id='user.settings.developer.title' defaultMessage='Developer Settings' diff --git a/web/react/components/user_settings/user_settings_display.jsx b/web/react/components/user_settings/user_settings_display.jsx index 3e468e08f..b0e64b0aa 100644 --- a/web/react/components/user_settings/user_settings_display.jsx +++ b/web/react/components/user_settings/user_settings_display.jsx @@ -444,10 +444,12 @@ export default class UserSettingsDisplay extends React.Component { className='modal-title' ref='title' > - <i - className='modal-back' - onClick={this.props.collapseModal} - /> + <div className='modal-back'> + <i + className='fa fa-angle-left' + onClick={this.props.collapseModal} + /> + </div> <FormattedMessage id='user.settings.display.title' defaultMessage='Display Settings' diff --git a/web/react/components/user_settings/user_settings_general.jsx b/web/react/components/user_settings/user_settings_general.jsx index 2f2116c2a..b0b1c414e 100644 --- a/web/react/components/user_settings/user_settings_general.jsx +++ b/web/react/components/user_settings/user_settings_general.jsx @@ -759,10 +759,12 @@ class UserSettingsGeneralTab extends React.Component { className='modal-title' ref='title' > - <i - className='modal-back' - onClick={this.props.collapseModal} - /> + <div className='modal-back'> + <i + className='fa fa-angle-left' + onClick={this.props.collapseModal} + /> + </div> <FormattedMessage id='user.settings.general.title' defaultMessage='General Settings' diff --git a/web/react/components/user_settings/user_settings_integrations.jsx b/web/react/components/user_settings/user_settings_integrations.jsx index e4f460a6d..7633b2f95 100644 --- a/web/react/components/user_settings/user_settings_integrations.jsx +++ b/web/react/components/user_settings/user_settings_integrations.jsx @@ -163,10 +163,12 @@ class UserSettingsIntegrationsTab extends React.Component { className='modal-title' ref='title' > - <i - className='modal-back' - onClick={this.props.collapseModal} - /> + <div className='modal-back'> + <i + className='fa fa-angle-left' + onClick={this.props.collapseModal} + /> + </div> <FormattedMessage id='user.settings.integrations.title' defaultMessage='Integration Settings' diff --git a/web/react/components/user_settings/user_settings_notifications.jsx b/web/react/components/user_settings/user_settings_notifications.jsx index ee9febb8e..3ef6435f1 100644 --- a/web/react/components/user_settings/user_settings_notifications.jsx +++ b/web/react/components/user_settings/user_settings_notifications.jsx @@ -774,10 +774,12 @@ class NotificationsTab extends React.Component { className='modal-title' ref='title' > - <i - className='modal-back' - onClick={this.props.collapseModal} - /> + <div className='modal-back'> + <i + className='fa fa-angle-left' + onClick={this.props.collapseModal} + /> + </div> <FormattedMessage id='user.settings.notifications.title' defaultMessage='Notification Settings' diff --git a/web/react/components/user_settings/user_settings_security.jsx b/web/react/components/user_settings/user_settings_security.jsx index 53d79906f..cba7ffdea 100644 --- a/web/react/components/user_settings/user_settings_security.jsx +++ b/web/react/components/user_settings/user_settings_security.jsx @@ -389,10 +389,12 @@ class SecurityTab extends React.Component { className='modal-title' ref='title' > - <i - className='modal-back' - onClick={this.props.collapseModal} - /> + <div className='modal-back'> + <i + className='fa fa-angle-left' + onClick={this.props.collapseModal} + /> + </div> <FormattedMessage id='user.settings.security.title' defaultMessage='Security Settings' |