Merge branch 'release-3.7' into master.

Этот коммит содержится в:
George Goldberg
2017-03-17 16:29:26 +00:00
родитель bfae88e60c 8568afe5b4
Коммит 7f266c1951
91 изменённых файлов: 941 добавлений и 801 удалений

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

@@ -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}

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

@@ -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}

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

@@ -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(

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

@@ -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(

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

@@ -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);

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

@@ -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();

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

@@ -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, '');

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

@@ -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(

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

@@ -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(

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

@@ -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(

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

@@ -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() {

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

@@ -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'