PLT-5071: Client side component of Telemetry. (#5516)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
f182d196ff
Коммит
97cc0a0d73
@@ -16,6 +16,7 @@ import * as Utils from 'utils/utils.jsx';
|
||||
|
||||
import {intlShape, injectIntl, defineMessages, FormattedMessage, FormattedHTMLMessage, FormattedDate} from 'react-intl';
|
||||
import {updateUser, uploadProfileImage} from 'actions/user_actions.jsx';
|
||||
import {trackEvent} from 'actions/diagnostics_actions.jsx';
|
||||
|
||||
const holders = defineMessages({
|
||||
usernameReserved: {
|
||||
@@ -127,6 +128,8 @@ class UserSettingsGeneralTab extends React.Component {
|
||||
|
||||
user.username = username;
|
||||
|
||||
trackEvent('settings', 'user_settings_update', {field: 'username'});
|
||||
|
||||
this.submitUser(user, Constants.UserUpdateEvents.USERNAME, false);
|
||||
}
|
||||
|
||||
@@ -143,6 +146,8 @@ class UserSettingsGeneralTab extends React.Component {
|
||||
|
||||
user.nickname = nickname;
|
||||
|
||||
trackEvent('settings', 'user_settings_update', {field: 'username'});
|
||||
|
||||
this.submitUser(user, Constants.UserUpdateEvents.NICKNAME, false);
|
||||
}
|
||||
|
||||
@@ -161,6 +166,8 @@ class UserSettingsGeneralTab extends React.Component {
|
||||
user.first_name = firstName;
|
||||
user.last_name = lastName;
|
||||
|
||||
trackEvent('settings', 'user_settings_update', {field: 'fullname'});
|
||||
|
||||
this.submitUser(user, Constants.UserUpdateEvents.FULLNAME, false);
|
||||
}
|
||||
|
||||
@@ -189,6 +196,7 @@ class UserSettingsGeneralTab extends React.Component {
|
||||
}
|
||||
|
||||
user.email = email;
|
||||
trackEvent('settings', 'user_settings_update', {field: 'email'});
|
||||
this.submitUser(user, Constants.UserUpdateEvents.EMAIL, true);
|
||||
}
|
||||
|
||||
@@ -228,6 +236,8 @@ class UserSettingsGeneralTab extends React.Component {
|
||||
return;
|
||||
}
|
||||
|
||||
trackEvent('settings', 'user_settings_update', {field: 'picture'});
|
||||
|
||||
const {formatMessage} = this.props.intl;
|
||||
const picture = this.state.picture;
|
||||
|
||||
@@ -268,6 +278,8 @@ class UserSettingsGeneralTab extends React.Component {
|
||||
|
||||
user.position = position;
|
||||
|
||||
trackEvent('settings', 'user_settings_update', {field: 'position'});
|
||||
|
||||
this.submitUser(user, Constants.UserUpdateEvents.Position, false);
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user