diff options
Diffstat (limited to 'webapp/components')
-rw-r--r-- | webapp/components/access_history_modal.jsx | 1 | ||||
-rw-r--r-- | webapp/components/activity_log_modal.jsx | 5 | ||||
-rw-r--r-- | webapp/components/admin_console/team_users.jsx | 5 | ||||
-rw-r--r-- | webapp/components/channel_invite_modal.jsx | 5 | ||||
-rw-r--r-- | webapp/components/create_comment.jsx | 2 | ||||
-rw-r--r-- | webapp/components/error_bar.jsx | 2 | ||||
-rw-r--r-- | webapp/components/login/login_controller.jsx | 4 | ||||
-rw-r--r-- | webapp/components/member_list_channel.jsx | 5 | ||||
-rw-r--r-- | webapp/components/member_list_team.jsx | 9 | ||||
-rw-r--r-- | webapp/components/more_channels.jsx | 5 | ||||
-rw-r--r-- | webapp/components/needs_team.jsx | 4 | ||||
-rw-r--r-- | webapp/components/post_view/components/post.jsx | 4 |
12 files changed, 30 insertions, 21 deletions
diff --git a/webapp/components/access_history_modal.jsx b/webapp/components/access_history_modal.jsx index 28a2b6b8f..4e1e69e3e 100644 --- a/webapp/components/access_history_modal.jsx +++ b/webapp/components/access_history_modal.jsx @@ -79,6 +79,7 @@ export default class AccessHistoryModal extends React.Component { return ( <Modal + dialogClassName='modal--scroll' show={this.state.show} onHide={this.onHide} onExited={this.props.onHide} diff --git a/webapp/components/activity_log_modal.jsx b/webapp/components/activity_log_modal.jsx index cd369f742..05c09ab88 100644 --- a/webapp/components/activity_log_modal.jsx +++ b/webapp/components/activity_log_modal.jsx @@ -102,7 +102,7 @@ export default class ActivityLogModal extends React.Component { if (currentSession.props.platform === 'Windows') { devicePicture = 'fa fa-windows'; - } else if (currentSession.device_id && currentSession.device_id.indexOf('apple:') === 0) { + } else if (currentSession.device_id && currentSession.device_id.indexOf('apple') === 0) { devicePicture = 'fa fa-apple'; devicePlatform = ( <FormattedMessage @@ -110,7 +110,7 @@ export default class ActivityLogModal extends React.Component { defaultMessage='iPhone Native App' /> ); - } else if (currentSession.device_id && currentSession.device_id.indexOf('android:') === 0) { + } else if (currentSession.device_id && currentSession.device_id.indexOf('android') === 0) { devicePlatform = ( <FormattedMessage id='activity_log_modal.androidNativeApp' @@ -275,6 +275,7 @@ export default class ActivityLogModal extends React.Component { return ( <Modal + dialogClassName='modal--scroll' show={this.state.show} onHide={this.onHide} onExited={this.props.onHide} diff --git a/webapp/components/admin_console/team_users.jsx b/webapp/components/admin_console/team_users.jsx index 0874e4c8c..5bdaedf6e 100644 --- a/webapp/components/admin_console/team_users.jsx +++ b/webapp/components/admin_console/team_users.jsx @@ -148,16 +148,17 @@ export default class UserList extends React.Component { } search(term) { + clearTimeout(this.searchTimeoutId); + if (term === '') { this.setState({search: false, users: UserStore.getProfileListInTeam(this.props.params.team)}); + this.searchTimeoutId = ''; return; } const options = {}; options[UserSearchOptions.ALLOW_INACTIVE] = true; - clearTimeout(this.searchTimeoutId); - const searchTimeoutId = setTimeout( () => { searchUsers( diff --git a/webapp/components/channel_invite_modal.jsx b/webapp/components/channel_invite_modal.jsx index 5deec0794..2f1a10a75 100644 --- a/webapp/components/channel_invite_modal.jsx +++ b/webapp/components/channel_invite_modal.jsx @@ -107,16 +107,17 @@ export default class ChannelInviteModal extends React.Component { } search(term) { + clearTimeout(this.searchTimeoutId); + this.term = term; if (term === '') { this.onChange(true); this.setState({search: false}); + this.searchTimeoutId = ''; return; } - clearTimeout(this.searchTimeoutId); - const searchTimeoutId = setTimeout( () => { searchUsers( diff --git a/webapp/components/create_comment.jsx b/webapp/components/create_comment.jsx index c7dbd0717..96280bbc1 100644 --- a/webapp/components/create_comment.jsx +++ b/webapp/components/create_comment.jsx @@ -349,7 +349,7 @@ export default class CreateComment extends React.Component { PostStore.storeCommentDraft(this.props.rootId, draft); // Focus on preview if needed - this.refs.preview.refs.container.scrollIntoViewIfNeeded(); + this.refs.preview.refs.container.scrollIntoView(); const enableAddButton = this.handleEnableAddButton(draft.message, draft.fileInfos); diff --git a/webapp/components/error_bar.jsx b/webapp/components/error_bar.jsx index a1981aa2a..edb929f20 100644 --- a/webapp/components/error_bar.jsx +++ b/webapp/components/error_bar.jsx @@ -30,7 +30,7 @@ export default class ErrorBar extends React.Component { this.onAnalyticsChange = this.onAnalyticsChange.bind(this); this.handleClose = this.handleClose.bind(this); - ErrorStore.clearNotificationError(); + ErrorStore.clearLastError(); let isSystemAdmin = false; const user = UserStore.getCurrentUser(); diff --git a/webapp/components/login/login_controller.jsx b/webapp/components/login/login_controller.jsx index d0aa0a5fc..01da0199f 100644 --- a/webapp/components/login/login_controller.jsx +++ b/webapp/components/login/login_controller.jsx @@ -131,8 +131,8 @@ export default class LoginController extends React.Component { checkMfa( loginId, - (data) => { - if (data && data.mfa_required === 'true') { + (requiresMfa) => { + if (requiresMfa) { this.setState({showMfa: true}); } else { this.submit(loginId, password, ''); diff --git a/webapp/components/member_list_channel.jsx b/webapp/components/member_list_channel.jsx index 6f8a266ad..d9d28bcd0 100644 --- a/webapp/components/member_list_channel.jsx +++ b/webapp/components/member_list_channel.jsx @@ -91,6 +91,8 @@ export default class MemberListChannel extends React.Component { } search(term) { + clearTimeout(this.searchTimeoutId); + if (term === '') { this.setState({ search: false, @@ -99,11 +101,10 @@ export default class MemberListChannel extends React.Component { teamMembers: Object.assign([], TeamStore.getMembersInTeam()), channelMembers: Object.assign([], ChannelStore.getMembersInChannel()) }); + this.searchTimeoutId = ''; return; } - clearTimeout(this.searchTimeoutId); - const searchTimeoutId = setTimeout( () => { searchUsers( diff --git a/webapp/components/member_list_team.jsx b/webapp/components/member_list_team.jsx index df17d7df2..e06d61b0a 100644 --- a/webapp/components/member_list_team.jsx +++ b/webapp/components/member_list_team.jsx @@ -43,7 +43,7 @@ export default class MemberListTeam extends React.Component { } componentDidMount() { - UserStore.addInTeamChangeListener(this.onChange); + UserStore.addInTeamChangeListener(this.onTeamChange); UserStore.addStatusesChangeListener(this.onChange); TeamStore.addChangeListener(this.onTeamChange); TeamStore.addStatsChangeListener(this.onStatsChange); @@ -53,7 +53,7 @@ export default class MemberListTeam extends React.Component { } componentWillUnmount() { - UserStore.removeInTeamChangeListener(this.onChange); + UserStore.removeInTeamChangeListener(this.onTeamChange); UserStore.removeStatusesChangeListener(this.onChange); TeamStore.removeChangeListener(this.onTeamChange); TeamStore.removeStatsChangeListener(this.onStatsChange); @@ -88,13 +88,14 @@ export default class MemberListTeam extends React.Component { } search(term) { + clearTimeout(this.searchTimeoutId); + if (term === '') { this.setState({search: false, term, users: UserStore.getProfileListInTeam(), teamMembers: Object.assign([], TeamStore.getMembersInTeam())}); + this.searchTimeoutId = ''; return; } - clearTimeout(this.searchTimeoutId); - const searchTimeoutId = setTimeout( () => { searchUsers( diff --git a/webapp/components/more_channels.jsx b/webapp/components/more_channels.jsx index d0b5f5399..10f597ad4 100644 --- a/webapp/components/more_channels.jsx +++ b/webapp/components/more_channels.jsx @@ -99,14 +99,15 @@ export default class MoreChannels extends React.Component { } search(term) { + clearTimeout(this.searchTimeoutId); + if (term === '') { this.onChange(true); this.setState({search: false}); + this.searchTimeoutId = ''; return; } - clearTimeout(this.searchTimeoutId); - const searchTimeoutId = setTimeout( () => { searchMoreChannels( diff --git a/webapp/components/needs_team.jsx b/webapp/components/needs_team.jsx index f589136b5..11e75bfb7 100644 --- a/webapp/components/needs_team.jsx +++ b/webapp/components/needs_team.jsx @@ -15,6 +15,8 @@ import ChannelStore from 'stores/channel_store.jsx'; import PostStore from 'stores/post_store.jsx'; import * as GlobalActions from 'actions/global_actions.jsx'; import {startPeriodicStatusUpdates, stopPeriodicStatusUpdates} from 'actions/status_actions.jsx'; +import {startPeriodicSync, stopPeriodicSync} from 'actions/websocket_actions.jsx'; + import Constants from 'utils/constants.jsx'; const TutorialSteps = Constants.TutorialSteps; const Preferences = Constants.Preferences; @@ -95,6 +97,7 @@ export default class NeedsTeam extends React.Component { GlobalActions.viewLoggedIn(); startPeriodicStatusUpdates(); + startPeriodicSync(); // Set up tracking for whether the window is active window.isActive = true; @@ -141,6 +144,7 @@ export default class NeedsTeam extends React.Component { iNoBounce.disable(); } stopPeriodicStatusUpdates(); + stopPeriodicSync(); } render() { diff --git a/webapp/components/post_view/components/post.jsx b/webapp/components/post_view/components/post.jsx index 913c2af95..fba4ce9eb 100644 --- a/webapp/components/post_view/components/post.jsx +++ b/webapp/components/post_view/components/post.jsx @@ -204,9 +204,7 @@ export default class Post extends React.Component { src={PostUtils.getProfilePicSrcForPost(post, timestamp)} /> ); - } - - if (PostUtils.isSystemMessage(post)) { + } else if (PostUtils.isSystemMessage(post)) { profilePic = ( <span className='icon' |