diff options
Diffstat (limited to 'web/react/components')
27 files changed, 115 insertions, 110 deletions
diff --git a/web/react/components/admin_console/image_settings.jsx b/web/react/components/admin_console/image_settings.jsx index 12bf554ea..86f78e093 100644 --- a/web/react/components/admin_console/image_settings.jsx +++ b/web/react/components/admin_console/image_settings.jsx @@ -8,10 +8,6 @@ import crypto from 'crypto'; import {injectIntl, intlShape, defineMessages, FormattedMessage} from 'mm-intl'; const holders = defineMessages({ - storeDisabled: { - id: 'admin.image.storeDisabled', - defaultMessage: 'Disable File Storage' - }, storeLocal: { id: 'admin.image.storeLocal', defaultMessage: 'Local File System' @@ -242,7 +238,6 @@ class FileSettings extends React.Component { defaultValue={this.props.config.FileSettings.DriverName} onChange={this.handleChange.bind(this, 'DriverName')} > - <option value=''>{formatMessage(holders.storeDisabled)}</option> <option value='local'>{formatMessage(holders.storeLocal)}</option> <option value='amazons3'>{formatMessage(holders.storeAmazonS3)}</option> </select> diff --git a/web/react/components/admin_console/user_item.jsx b/web/react/components/admin_console/user_item.jsx index 02b01b090..0c1a55cc1 100644 --- a/web/react/components/admin_console/user_item.jsx +++ b/web/react/components/admin_console/user_item.jsx @@ -360,8 +360,8 @@ export default class UserItem extends React.Component { height='36' width='36' /> - <span className='member-name'>{Utils.getDisplayName(user)}</span> - <span className='member-email'>{email}</span> + <span className='more-name'>{Utils.getDisplayName(user)}</span> + <span className='more-description'>{email}</span> <div className='dropdown member-drop'> <a href='#' diff --git a/web/react/components/channel_header.jsx b/web/react/components/channel_header.jsx index 8fc3cd63d..a827cbcc6 100644 --- a/web/react/components/channel_header.jsx +++ b/web/react/components/channel_header.jsx @@ -114,7 +114,7 @@ export default class ChannelHeader extends React.Component { } AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_SEARCH_TERM, + type: ActionTypes.RECEIVED_SEARCH_TERM, term: terms, do_search: true, is_mention_search: true diff --git a/web/react/components/create_comment.jsx b/web/react/components/create_comment.jsx index 709485991..55dd8276c 100644 --- a/web/react/components/create_comment.jsx +++ b/web/react/components/create_comment.jsx @@ -152,7 +152,7 @@ class CreateComment extends React.Component { ChannelStore.setChannelMember(member); AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_POST, + type: ActionTypes.RECEIVED_POST, post: data }); }.bind(this), @@ -216,7 +216,7 @@ class CreateComment extends React.Component { } AppDispatcher.handleViewAction({ - type: ActionTypes.RECIEVED_EDIT_POST, + type: ActionTypes.RECEIVED_EDIT_POST, refocusId: '#reply_textbox', title: this.props.intl.formatMessage(holders.commentTitle), message: lastPost.message, diff --git a/web/react/components/create_post.jsx b/web/react/components/create_post.jsx index ecabdaee6..b9fbf09b5 100644 --- a/web/react/components/create_post.jsx +++ b/web/react/components/create_post.jsx @@ -364,7 +364,7 @@ class CreatePost extends React.Component { var type = (lastPost.root_id && lastPost.root_id.length > 0) ? formatMessage(holders.comment) : formatMessage(holders.post); AppDispatcher.handleViewAction({ - type: ActionTypes.RECIEVED_EDIT_POST, + type: ActionTypes.RECEIVED_EDIT_POST, refocusId: '#post_textbox', title: type, message: lastPost.message, diff --git a/web/react/components/delete_post_modal.jsx b/web/react/components/delete_post_modal.jsx index 9d7dcb3e5..65ffa96a1 100644 --- a/web/react/components/delete_post_modal.jsx +++ b/web/react/components/delete_post_modal.jsx @@ -62,12 +62,12 @@ export default class DeletePostModal extends React.Component { var selectedPost = selectedList.posts[selectedList.order[0]]; if ((selectedPost.id === this.state.post.id && !this.state.root_id) || selectedPost.root_id === this.state.post.id) { AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_SEARCH, + type: ActionTypes.RECEIVED_SEARCH, results: null }); AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_POST_SELECTED, + type: ActionTypes.RECEIVED_POST_SELECTED, results: null }); } else if (selectedPost.id === this.state.post.id && this.state.root_id) { @@ -76,12 +76,12 @@ export default class DeletePostModal extends React.Component { delete selectedList.posts[selectedPost.id]; AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_POST_SELECTED, + type: ActionTypes.RECEIVED_POST_SELECTED, post_list: selectedList }); AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_SEARCH, + type: ActionTypes.RECEIVED_SEARCH, results: null }); } diff --git a/web/react/components/edit_channel_header_modal.jsx b/web/react/components/edit_channel_header_modal.jsx index 1066d123e..f6865fadd 100644 --- a/web/react/components/edit_channel_header_modal.jsx +++ b/web/react/components/edit_channel_header_modal.jsx @@ -68,7 +68,7 @@ class EditChannelHeaderModal extends React.Component { this.onHide(); AppDispatcher.handleServerAction({ - type: Constants.ActionTypes.RECIEVED_CHANNEL, + type: Constants.ActionTypes.RECEIVED_CHANNEL, channel }); }, diff --git a/web/react/components/member_list_item.jsx b/web/react/components/member_list_item.jsx index c50ee5c96..41ea58eeb 100644 --- a/web/react/components/member_list_item.jsx +++ b/web/react/components/member_list_item.jsx @@ -124,8 +124,8 @@ export default class MemberListItem extends React.Component { height='36' width='36' /> - <div className='member-name'>{Utils.displayUsername(member.id)}</div> - <div className='member-description'>{member.email}</div> + <div className='more-name'>{Utils.displayUsername(member.id)}</div> + <div className='more-description'>{member.email}</div> </td> <td className='td--action lg'>{invite}</td> </tr> diff --git a/web/react/components/member_list_team_item.jsx b/web/react/components/member_list_team_item.jsx index 6e1006911..30086d1b2 100644 --- a/web/react/components/member_list_team_item.jsx +++ b/web/react/components/member_list_team_item.jsx @@ -208,8 +208,8 @@ export default class MemberListTeamItem extends React.Component { height='36' width='36' /> - <span className='member-name'>{Utils.displayUsername(user.id)}</span> - <span className='member-email'>{email}</span> + <span className='more-name'>{Utils.displayUsername(user.id)}</span> + <span className='more-description'>{email}</span> <div className='dropdown member-drop'> <a href='#' diff --git a/web/react/components/more_channels.jsx b/web/react/components/more_channels.jsx index d12ea4703..d800f93d8 100644 --- a/web/react/components/more_channels.jsx +++ b/web/react/components/more_channels.jsx @@ -114,7 +114,7 @@ export default class MoreChannels extends React.Component { <tr key={channel.id}> <td> <p className='more-name'>{channel.display_name}</p> - <p className='more-purpose'>{channel.purpose}</p> + <p className='more-description'>{channel.purpose}</p> </td> <td className='td--action'> {joinButton} diff --git a/web/react/components/more_direct_channels.jsx b/web/react/components/more_direct_channels.jsx index f8a6884d0..3b72b251c 100644 --- a/web/react/components/more_direct_channels.jsx +++ b/web/react/components/more_direct_channels.jsx @@ -57,7 +57,7 @@ class MoreDirectChannels extends React.Component { } componentWillUnmount() { - UserStore.addChangeListener(this.handleUserChange); + UserStore.removeChangeListener(this.handleUserChange); } componentDidUpdate(prevProps) { @@ -318,4 +318,4 @@ MoreDirectChannels.propTypes = { onModalDismissed: React.PropTypes.func }; -export default injectIntl(MoreDirectChannels);
\ No newline at end of file +export default injectIntl(MoreDirectChannels); diff --git a/web/react/components/navbar.jsx b/web/react/components/navbar.jsx index 8005678a2..e6a9fbd25 100644 --- a/web/react/components/navbar.jsx +++ b/web/react/components/navbar.jsx @@ -82,12 +82,12 @@ export default class Navbar extends React.Component { var windowWidth = $(window).outerWidth(); if (windowWidth <= 768) { AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_SEARCH, + type: ActionTypes.RECEIVED_SEARCH, results: null }); AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_POST_SELECTED, + type: ActionTypes.RECEIVED_POST_SELECTED, results: null }); diff --git a/web/react/components/post.jsx b/web/react/components/post.jsx index 53fe7fb5d..3619a9f8f 100644 --- a/web/react/components/post.jsx +++ b/web/react/components/post.jsx @@ -31,12 +31,12 @@ export default class Post extends React.Component { data.posts = this.props.posts; AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_POST_SELECTED, + type: ActionTypes.RECEIVED_POST_SELECTED, post_list: data }); AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_SEARCH, + type: ActionTypes.RECEIVED_SEARCH, results: null }); } @@ -59,7 +59,7 @@ export default class Post extends React.Component { ChannelStore.setChannelMember(member); AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_POST, + type: ActionTypes.RECEIVED_POST, post: data }); }, diff --git a/web/react/components/post_deleted_modal.jsx b/web/react/components/post_deleted_modal.jsx index 218f57eb5..642befeab 100644 --- a/web/react/components/post_deleted_modal.jsx +++ b/web/react/components/post_deleted_modal.jsx @@ -24,19 +24,19 @@ export default class PostDeletedModal extends React.Component { } handleClose() { AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_SEARCH, + type: ActionTypes.RECEIVED_SEARCH, results: null }); AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_SEARCH_TERM, + type: ActionTypes.RECEIVED_SEARCH_TERM, term: null, do_search: false, is_mention_search: false }); AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_POST_SELECTED, + type: ActionTypes.RECEIVED_POST_SELECTED, results: null }); } diff --git a/web/react/components/posts_view.jsx b/web/react/components/posts_view.jsx index f108ace2e..ebe19abad 100644 --- a/web/react/components/posts_view.jsx +++ b/web/react/components/posts_view.jsx @@ -94,7 +94,7 @@ export default class PostsView extends React.Component { }); } - this.scrollStopAction.fireAfter(1000); + this.scrollStopAction.fireAfter(2000); } handleScrollStop() { this.setState({ @@ -564,6 +564,8 @@ function ScrollToBottomArrows({isScrolling, atBottom, onClick}) { <div className={className} onClick={onClick} - /> + > + <span dangerouslySetInnerHTML={{__html: Constants.SCROLL_BOTTOM_ICON}} /> + </div> ); } diff --git a/web/react/components/rhs_comment.jsx b/web/react/components/rhs_comment.jsx index 1addebbe4..9c85e9940 100644 --- a/web/react/components/rhs_comment.jsx +++ b/web/react/components/rhs_comment.jsx @@ -49,7 +49,7 @@ class RhsComment extends React.Component { ChannelStore.setChannelMember(member); AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_POST, + type: ActionTypes.RECEIVED_POST, post: data }); }, @@ -267,4 +267,4 @@ RhsComment.propTypes = { post: React.PropTypes.object }; -export default injectIntl(RhsComment);
\ No newline at end of file +export default injectIntl(RhsComment); diff --git a/web/react/components/rhs_header_post.jsx b/web/react/components/rhs_header_post.jsx index d56ba76f8..cd310df56 100644 --- a/web/react/components/rhs_header_post.jsx +++ b/web/react/components/rhs_header_post.jsx @@ -21,12 +21,12 @@ export default class RhsHeaderPost extends React.Component { e.preventDefault(); AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_SEARCH, + type: ActionTypes.RECEIVED_SEARCH, results: null }); AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_POST_SELECTED, + type: ActionTypes.RECEIVED_POST_SELECTED, results: null }); } @@ -34,14 +34,14 @@ export default class RhsHeaderPost extends React.Component { e.preventDefault(); AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_SEARCH_TERM, + type: ActionTypes.RECEIVED_SEARCH_TERM, term: this.props.fromSearch, do_search: true, is_mention_search: this.props.isMentionSearch }); AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_POST_SELECTED, + type: ActionTypes.RECEIVED_POST_SELECTED, results: null }); } diff --git a/web/react/components/search_bar.jsx b/web/react/components/search_bar.jsx index 35d7e9514..f7cb1b8f2 100644 --- a/web/react/components/search_bar.jsx +++ b/web/react/components/search_bar.jsx @@ -74,19 +74,19 @@ class SearchBar extends React.Component { e.preventDefault(); AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_SEARCH, + type: ActionTypes.RECEIVED_SEARCH, results: null }); AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_SEARCH_TERM, + type: ActionTypes.RECEIVED_SEARCH_TERM, term: null, do_search: false, is_mention_search: false }); AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_POST_SELECTED, + type: ActionTypes.RECEIVED_POST_SELECTED, results: null }); } @@ -117,7 +117,7 @@ class SearchBar extends React.Component { } AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_SEARCH, + type: ActionTypes.RECEIVED_SEARCH, results: data, is_mention_search: isMentionSearch }); diff --git a/web/react/components/search_results_header.jsx b/web/react/components/search_results_header.jsx index 45f56f65a..7f88eb2c7 100644 --- a/web/react/components/search_results_header.jsx +++ b/web/react/components/search_results_header.jsx @@ -19,19 +19,19 @@ export default class SearchResultsHeader extends React.Component { e.preventDefault(); AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_SEARCH, + type: ActionTypes.RECEIVED_SEARCH, results: null }); AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_SEARCH_TERM, + type: ActionTypes.RECEIVED_SEARCH_TERM, term: null, do_search: false, is_mention_search: false }); AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_POST_SELECTED, + type: ActionTypes.RECEIVED_POST_SELECTED, results: null }); } @@ -72,4 +72,4 @@ export default class SearchResultsHeader extends React.Component { SearchResultsHeader.propTypes = { isMentionSearch: React.PropTypes.bool -};
\ No newline at end of file +}; diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx index 14790fbec..c7dba306b 100644 --- a/web/react/components/sidebar.jsx +++ b/web/react/components/sidebar.jsx @@ -96,7 +96,7 @@ export default class Sidebar extends React.Component { let directChannel = channels.find(Utils.isDirectChannelForUser.bind(null, teammateId)); // a direct channel doesn't exist yet so create a fake one - if (!directChannel) { + if (directChannel == null) { directChannel = { name: Utils.getDirectChannelName(currentUserId, teammateId), last_post_at: 0, @@ -104,6 +104,8 @@ export default class Sidebar extends React.Component { type: Constants.DM_CHANNEL, fake: true }; + } else { + directChannel = JSON.parse(JSON.stringify(directChannel)); } directChannel.display_name = Utils.displayUsername(teammateId); diff --git a/web/react/components/signup_user_complete.jsx b/web/react/components/signup_user_complete.jsx index 672213d1a..b770a2a2c 100644 --- a/web/react/components/signup_user_complete.jsx +++ b/web/react/components/signup_user_complete.jsx @@ -362,6 +362,17 @@ class SignupUserComplete extends React.Component { ); } + if (signupMessage.length === 0 && !emailSignup) { + emailSignup = ( + <div> + <FormattedMessage + id='signup_user_completed.none' + defaultMessage='No user creation method has been enabled. Please contact an administrator for access.' + /> + </div> + ); + } + return ( <div> <form> diff --git a/web/react/components/user_settings/import_theme_modal.jsx b/web/react/components/user_settings/import_theme_modal.jsx index 66bed0b0b..e9e90a936 100644 --- a/web/react/components/user_settings/import_theme_modal.jsx +++ b/web/react/components/user_settings/import_theme_modal.jsx @@ -84,7 +84,7 @@ class ImportThemeModal extends React.Component { Client.updateUser(user, (data) => { AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_ME, + type: ActionTypes.RECEIVED_ME, me: data }); @@ -212,4 +212,4 @@ ImportThemeModal.propTypes = { intl: intlShape.isRequired }; -export default injectIntl(ImportThemeModal);
\ No newline at end of file +export default injectIntl(ImportThemeModal); diff --git a/web/react/components/user_settings/manage_command_hooks.jsx b/web/react/components/user_settings/manage_command_hooks.jsx index 948ab7885..3656424b2 100644 --- a/web/react/components/user_settings/manage_command_hooks.jsx +++ b/web/react/components/user_settings/manage_command_hooks.jsx @@ -271,7 +271,7 @@ export default class ManageCommandCmds extends React.Component { cmds.push( <div key={cmd.id} - className='webcmd__item' + className='webhook__item webcmd__item' > <div className='padding-top x2'> <strong> @@ -400,7 +400,7 @@ export default class ManageCommandCmds extends React.Component { } const existingCmds = ( - <div className='webcmds__container'> + <div className='webhooks__container webcmds__container'> <label className='control-label padding-top x2'> <FormattedMessage id='user.settings.cmds.existing' @@ -408,7 +408,7 @@ export default class ManageCommandCmds extends React.Component { /> </label> <div className='padding-top divider-light'></div> - <div className='webcmds__list'> + <div className='webhooks__list webcmds__list'> {displayCmds} </div> </div> @@ -530,17 +530,19 @@ export default class ManageCommandCmds extends React.Component { /> </label> <div className='padding-top'> - <label> - <input - type='checkbox' - checked={this.state.cmd.auto_complete} - onChange={this.updateAutoComplete} - /> - <FormattedMessage - id='user.settings.cmds.auto_complete_help' - defaultMessage='Show this command in autocomplete list' - /> - </label> + <div className='checkbox'> + <label> + <input + type='checkbox' + checked={this.state.cmd.auto_complete} + onChange={this.updateAutoComplete} + /> + <FormattedMessage + id='user.settings.cmds.auto_complete_help' + defaultMessage=' Show this command in autocomplete list' + /> + </label> + </div> </div> </div> <div className='padding-top x2'> @@ -637,7 +639,7 @@ export default class ManageCommandCmds extends React.Component { </div> {addError} </div> - <div className='padding-top padding-bottom'> + <div className='padding-top x2 padding-bottom'> <a className={'btn btn-sm btn-primary'} href='#' diff --git a/web/react/components/user_settings/user_settings_advanced.jsx b/web/react/components/user_settings/user_settings_advanced.jsx index 5c0757589..e513f81d2 100644 --- a/web/react/components/user_settings/user_settings_advanced.jsx +++ b/web/react/components/user_settings/user_settings_advanced.jsx @@ -47,10 +47,6 @@ const holders = defineMessages({ EMBED_PREVIEW: { id: 'user.settings.advance.embed_preview', defaultMessage: 'Show preview snippet of links below message' - }, - LOC_PREVIEW: { - id: 'user.settings.advance.loc_preview', - defaultMessage: 'Show user language in display settings' } }); diff --git a/web/react/components/user_settings/user_settings_display.jsx b/web/react/components/user_settings/user_settings_display.jsx index 4b11c06fb..5f23a8995 100644 --- a/web/react/components/user_settings/user_settings_display.jsx +++ b/web/react/components/user_settings/user_settings_display.jsx @@ -10,7 +10,6 @@ import PreferenceStore from '../../stores/preference_store.jsx'; import * as Utils from '../../utils/utils.jsx'; import Constants from '../../utils/constants.jsx'; -const PreReleaseFeatures = Constants.PRE_RELEASE_FEATURES; import {savePreferences} from '../../utils/client.jsx'; import {intlShape, injectIntl, defineMessages, FormattedMessage} from 'mm-intl'; @@ -379,46 +378,44 @@ class UserSettingsDisplay extends React.Component { ); } - if (Utils.isFeatureEnabled(PreReleaseFeatures.LOC_PREVIEW)) { - if (this.props.activeSection === 'languages') { - var inputs = []; - inputs.push( - <ManageLanguages - user={this.props.user} - key='languages-ui' - /> - ); + if (this.props.activeSection === 'languages') { + var inputs = []; + inputs.push( + <ManageLanguages + user={this.props.user} + key='languages-ui' + /> + ); - languagesSection = ( - <SettingItemMax - title={formatMessage(holders.language)} - width='medium' - inputs={inputs} - updateSection={(e) => { - this.updateSection(''); - e.preventDefault(); - }} - /> - ); - } else { - var locale = 'English'; - Utils.languages().forEach((l) => { - if (l.value === this.props.user.locale) { - locale = l.name; - } - }); + languagesSection = ( + <SettingItemMax + title={formatMessage(holders.language)} + width='medium' + inputs={inputs} + updateSection={(e) => { + this.updateSection(''); + e.preventDefault(); + }} + /> + ); + } else { + var locale = 'English'; + Utils.languages().forEach((l) => { + if (l.value === this.props.user.locale) { + locale = l.name; + } + }); - languagesSection = ( - <SettingItemMin - title={formatMessage(holders.language)} - width='medium' - describe={locale} - updateSection={() => { - this.updateSection('languages'); - }} - /> - ); - } + languagesSection = ( + <SettingItemMin + title={formatMessage(holders.language)} + width='medium' + describe={locale} + updateSection={() => { + this.updateSection('languages'); + }} + /> + ); } return ( diff --git a/web/react/components/user_settings/user_settings_modal.jsx b/web/react/components/user_settings/user_settings_modal.jsx index e0b72157b..90f28822b 100644 --- a/web/react/components/user_settings/user_settings_modal.jsx +++ b/web/react/components/user_settings/user_settings_modal.jsx @@ -234,7 +234,7 @@ class UserSettingsModal extends React.Component { tabs.push({name: 'developer', uiName: formatMessage(holders.developer), icon: 'glyphicon glyphicon-th'}); } - if (global.window.mm_config.EnableIncomingWebhooks === 'true' || global.window.mm_config.EnableOutgoingWebhooks === 'true') { + if (global.window.mm_config.EnableIncomingWebhooks === 'true' || global.window.mm_config.EnableOutgoingWebhooks === 'true' || global.window.mm_config.EnableCommands === 'true') { tabs.push({name: 'integrations', uiName: formatMessage(holders.integrations), icon: 'glyphicon glyphicon-transfer'}); } tabs.push({name: 'display', uiName: formatMessage(holders.display), icon: 'glyphicon glyphicon-eye-open'}); diff --git a/web/react/components/user_settings/user_settings_theme.jsx b/web/react/components/user_settings/user_settings_theme.jsx index a0656feaa..34c688db1 100644 --- a/web/react/components/user_settings/user_settings_theme.jsx +++ b/web/react/components/user_settings/user_settings_theme.jsx @@ -107,7 +107,7 @@ export default class ThemeSetting extends React.Component { Client.updateUser(user, (data) => { AppDispatcher.handleServerAction({ - type: ActionTypes.RECIEVED_ME, + type: ActionTypes.RECEIVED_ME, me: data }); |