Move user actions over to use redux and v4 (#6649)
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
0c04c5334f
Коммит
c0a0065472
@@ -12,7 +12,7 @@ import TeamStore from 'stores/team_store.jsx';
|
||||
|
||||
import Constants from 'utils/constants.jsx';
|
||||
import {displayUsernameForUser} from 'utils/utils.jsx';
|
||||
import Client from 'client/web_client.jsx';
|
||||
import {Client4} from 'mattermost-redux/client';
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
@@ -170,7 +170,7 @@ export default class AddUsersToTeam extends React.Component {
|
||||
onClick={() => onAdd(option)}
|
||||
>
|
||||
<ProfilePicture
|
||||
src={`${Client.getUsersRoute()}/${option.id}/image?time=${option.last_picture_update}`}
|
||||
src={Client4.getProfilePictureUrl(option.id, option.last_picture_update)}
|
||||
width='32'
|
||||
height='32'
|
||||
/>
|
||||
|
||||
@@ -9,7 +9,7 @@ import {FormattedMessage} from 'react-intl';
|
||||
|
||||
import * as TeamActions from 'actions/team_actions.jsx';
|
||||
|
||||
import Client from 'client/web_client.jsx';
|
||||
import {Client4} from 'mattermost-redux/client';
|
||||
|
||||
import LoadingScreen from 'components/loading_screen.jsx';
|
||||
|
||||
@@ -184,7 +184,7 @@ export default class ManageTeamsModal extends React.Component {
|
||||
<div className='manage-teams__user'>
|
||||
<img
|
||||
className='manage-teams__profile-picture'
|
||||
src={Client.getProfilePictureUrl(user.id, user.last_picture_update)}
|
||||
src={Client4.getProfilePictureUrl(user.id, user.last_picture_update)}
|
||||
/>
|
||||
<div className='manage-teams__info'>
|
||||
<div className='manage-teams__name'>
|
||||
|
||||
@@ -51,6 +51,7 @@ export default class OAuthToEmail extends React.Component {
|
||||
this.setState(state);
|
||||
|
||||
oauthToEmail(
|
||||
this.props.currentType,
|
||||
this.props.email,
|
||||
password,
|
||||
null,
|
||||
|
||||
@@ -12,7 +12,7 @@ import TeamStore from 'stores/team_store.jsx';
|
||||
|
||||
import Constants from 'utils/constants.jsx';
|
||||
import {displayUsernameForUser} from 'utils/utils.jsx';
|
||||
import Client from 'client/web_client.jsx';
|
||||
import {Client4} from 'mattermost-redux/client';
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
@@ -227,7 +227,7 @@ export default class MoreDirectChannels extends React.Component {
|
||||
onClick={() => onAdd(option)}
|
||||
>
|
||||
<ProfilePicture
|
||||
src={`${Client.getUsersRoute()}/${option.id}/image?time=${option.last_picture_update}`}
|
||||
src={Client4.getProfilePictureUrl(option.id, option.last_picture_update)}
|
||||
status={`${UserStore.getStatus(option.id)}`}
|
||||
width='32'
|
||||
height='32'
|
||||
|
||||
@@ -13,7 +13,7 @@ import ChannelInviteModal from 'components/channel_invite_modal';
|
||||
|
||||
import {openDirectChannelToUser} from 'actions/channel_actions.jsx';
|
||||
|
||||
import Client from 'client/web_client.jsx';
|
||||
import {Client4} from 'mattermost-redux/client';
|
||||
import * as Utils from 'utils/utils.jsx';
|
||||
import Constants from 'utils/constants.jsx';
|
||||
import {canManageMembers} from 'utils/channel_utils.jsx';
|
||||
@@ -132,7 +132,7 @@ export default class PopoverListMembers extends React.Component {
|
||||
key={'popover-member-' + i}
|
||||
>
|
||||
<ProfilePicture
|
||||
src={`${Client.getUsersRoute()}/${m.id}/image?time=${m.last_picture_update}`}
|
||||
src={Client4.getProfilePictureUrl(m.id, m.last_picture_update)}
|
||||
width='26'
|
||||
height='26'
|
||||
/>
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See License.txt for license information.
|
||||
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import PreferenceStore from 'stores/preference_store.jsx';
|
||||
import * as Utils from 'utils/utils.jsx';
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
getCurrentUser,
|
||||
getStatusForUserId
|
||||
} from 'mattermost-redux/selectors/entities/users';
|
||||
import {Client} from 'mattermost-redux/client';
|
||||
import {Client4} from 'mattermost-redux/client';
|
||||
|
||||
import StatusDropdown from 'components/status_dropdown/status_dropdown.jsx';
|
||||
|
||||
@@ -13,7 +13,7 @@ function mapStateToProps(state) {
|
||||
const currentUser = getCurrentUser(state);
|
||||
const userId = currentUser.id;
|
||||
const lastPicUpdate = currentUser.last_picture_update;
|
||||
const profilePicture = Client.getProfilePictureUrl(userId, lastPicUpdate);
|
||||
const profilePicture = Client4.getProfilePictureUrl(userId, lastPicUpdate);
|
||||
const status = getStatusForUserId(state, currentUser.id);
|
||||
return {
|
||||
userId,
|
||||
|
||||
Ссылка в новой задаче
Block a user