Refactor login, claim and create_team into views and add actions (#3110)
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
9c0caaa765
Коммит
6fecfcc7ca
12
webapp/actions/analytics_actions.jsx
Обычный файл
12
webapp/actions/analytics_actions.jsx
Обычный файл
@@ -0,0 +1,12 @@
|
|||||||
|
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
|
||||||
|
// See License.txt for license information.
|
||||||
|
|
||||||
|
import Client from 'utils/web_client.jsx';
|
||||||
|
|
||||||
|
export function track(category, action, label, property, value) {
|
||||||
|
Client.track(category, action, label, property, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function trackPage() {
|
||||||
|
Client.trackPage();
|
||||||
|
}
|
||||||
@@ -18,6 +18,8 @@ import * as Utils from 'utils/utils.jsx';
|
|||||||
import * as Websockets from './websocket_actions.jsx';
|
import * as Websockets from './websocket_actions.jsx';
|
||||||
import * as I18n from 'i18n/i18n.jsx';
|
import * as I18n from 'i18n/i18n.jsx';
|
||||||
|
|
||||||
|
import {trackPage} from 'actions/analytics_actions.jsx';
|
||||||
|
|
||||||
import {browserHistory} from 'react-router';
|
import {browserHistory} from 'react-router';
|
||||||
|
|
||||||
import en from 'i18n/en.json';
|
import en from 'i18n/en.json';
|
||||||
@@ -40,7 +42,7 @@ export function emitChannelClickEvent(channel) {
|
|||||||
AsyncClient.getChannelExtraInfo(chan.id);
|
AsyncClient.getChannelExtraInfo(chan.id);
|
||||||
AsyncClient.updateLastViewedAt(chan.id);
|
AsyncClient.updateLastViewedAt(chan.id);
|
||||||
AsyncClient.getPosts(chan.id);
|
AsyncClient.getPosts(chan.id);
|
||||||
Client.trackPage();
|
trackPage();
|
||||||
|
|
||||||
AppDispatcher.handleViewAction({
|
AppDispatcher.handleViewAction({
|
||||||
type: ActionTypes.CLICK_CHANNEL,
|
type: ActionTypes.CLICK_CHANNEL,
|
||||||
38
webapp/actions/team_actions.jsx
Обычный файл
38
webapp/actions/team_actions.jsx
Обычный файл
@@ -0,0 +1,38 @@
|
|||||||
|
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
|
||||||
|
// See License.txt for license information.
|
||||||
|
|
||||||
|
import UserStore from 'stores/user_store.jsx';
|
||||||
|
|
||||||
|
import Constants from 'utils/constants.jsx';
|
||||||
|
const ActionTypes = Constants.ActionTypes;
|
||||||
|
|
||||||
|
import * as AsyncClient from 'utils/async_client.jsx';
|
||||||
|
import Client from 'utils/web_client.jsx';
|
||||||
|
import AppDispatcher from '../dispatcher/app_dispatcher.jsx';
|
||||||
|
|
||||||
|
import {browserHistory} from 'react-router';
|
||||||
|
|
||||||
|
export function checkIfTeamExists(teamName, onSuccess, onError) {
|
||||||
|
Client.findTeamByName(teamName, onSuccess, onError);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function createTeam(team, onSuccess, onError) {
|
||||||
|
Client.createTeam(team,
|
||||||
|
(rteam) => {
|
||||||
|
AsyncClient.getDirectProfiles();
|
||||||
|
|
||||||
|
AppDispatcher.handleServerAction({
|
||||||
|
type: ActionTypes.CREATED_TEAM,
|
||||||
|
team: rteam,
|
||||||
|
member: {team_id: rteam.id, user_id: UserStore.getCurrentId(), roles: 'admin'}
|
||||||
|
});
|
||||||
|
|
||||||
|
browserHistory.push('/' + rteam.name + '/channels/town-square');
|
||||||
|
|
||||||
|
if (onSuccess) {
|
||||||
|
onSuccess(rteam);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onError
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -13,7 +13,7 @@ import NotificationStore from 'stores/notification_store.jsx'; //eslint-disable-
|
|||||||
import Client from 'utils/web_client.jsx';
|
import Client from 'utils/web_client.jsx';
|
||||||
import * as Utils from 'utils/utils.jsx';
|
import * as Utils from 'utils/utils.jsx';
|
||||||
import * as AsyncClient from 'utils/async_client.jsx';
|
import * as AsyncClient from 'utils/async_client.jsx';
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
|
|
||||||
import Constants from 'utils/constants.jsx';
|
import Constants from 'utils/constants.jsx';
|
||||||
const SocketEvents = Constants.SocketEvents;
|
const SocketEvents = Constants.SocketEvents;
|
||||||
@@ -6,7 +6,7 @@ import ReactDOM from 'react-dom';
|
|||||||
|
|
||||||
import TeamStore from 'stores/team_store.jsx';
|
import TeamStore from 'stores/team_store.jsx';
|
||||||
import Constants from 'utils/constants.jsx';
|
import Constants from 'utils/constants.jsx';
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
|
|
||||||
import {FormattedMessage} from 'react-intl';
|
import {FormattedMessage} from 'react-intl';
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {Link} from 'react-router';
|
|||||||
|
|
||||||
import logoImage from 'images/logo.png';
|
import logoImage from 'images/logo.png';
|
||||||
|
|
||||||
export default class Claim extends React.Component {
|
export default class ClaimController extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
@@ -51,9 +51,9 @@ export default class Claim extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Claim.defaultProps = {
|
ClaimController.defaultProps = {
|
||||||
};
|
};
|
||||||
Claim.propTypes = {
|
ClaimController.propTypes = {
|
||||||
location: React.PropTypes.object.isRequired,
|
location: React.PropTypes.object.isRequired,
|
||||||
children: React.PropTypes.node
|
children: React.PropTypes.node
|
||||||
};
|
};
|
||||||
@@ -16,7 +16,7 @@ import MsgTyping from './msg_typing.jsx';
|
|||||||
import FileUpload from './file_upload.jsx';
|
import FileUpload from './file_upload.jsx';
|
||||||
import FilePreview from './file_preview.jsx';
|
import FilePreview from './file_preview.jsx';
|
||||||
import * as Utils from 'utils/utils.jsx';
|
import * as Utils from 'utils/utils.jsx';
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
|
|
||||||
import Constants from 'utils/constants.jsx';
|
import Constants from 'utils/constants.jsx';
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import PostDeletedModal from './post_deleted_modal.jsx';
|
|||||||
import TutorialTip from './tutorial/tutorial_tip.jsx';
|
import TutorialTip from './tutorial/tutorial_tip.jsx';
|
||||||
|
|
||||||
import AppDispatcher from '../dispatcher/app_dispatcher.jsx';
|
import AppDispatcher from '../dispatcher/app_dispatcher.jsx';
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
import Client from 'utils/web_client.jsx';
|
import Client from 'utils/web_client.jsx';
|
||||||
import * as Utils from 'utils/utils.jsx';
|
import * as Utils from 'utils/utils.jsx';
|
||||||
|
|
||||||
|
|||||||
@@ -1,29 +1,19 @@
|
|||||||
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
|
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
|
||||||
// See License.txt for license information.
|
// See License.txt for license information.
|
||||||
|
|
||||||
import ReactDOM from 'react-dom';
|
import {track} from 'actions/analytics_actions.jsx';
|
||||||
import * as utils from 'utils/utils.jsx';
|
|
||||||
import Client from 'utils/web_client.jsx';
|
|
||||||
import {Link} from 'react-router';
|
|
||||||
|
|
||||||
import {injectIntl, intlShape, defineMessages, FormattedMessage} from 'react-intl';
|
import * as Utils from 'utils/utils.jsx';
|
||||||
|
import Constants from 'utils/constants.jsx';
|
||||||
|
|
||||||
import logoImage from 'images/logo.png';
|
import logoImage from 'images/logo.png';
|
||||||
|
|
||||||
const holders = defineMessages({
|
|
||||||
required: {
|
|
||||||
id: 'create_team.display_name.required',
|
|
||||||
defaultMessage: 'This field is required'
|
|
||||||
},
|
|
||||||
charLength: {
|
|
||||||
id: 'create_team.display_name.charLength',
|
|
||||||
defaultMessage: 'Name must be 4 or more characters up to a maximum of 15'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import ReactDOM from 'react-dom';
|
||||||
|
import {Link} from 'react-router';
|
||||||
|
import {FormattedMessage} from 'react-intl';
|
||||||
|
|
||||||
class TeamSignupDisplayNamePage extends React.Component {
|
export default class TeamSignupDisplayNamePage extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
@@ -35,19 +25,18 @@ class TeamSignupDisplayNamePage extends React.Component {
|
|||||||
submitNext(e) {
|
submitNext(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
const {formatMessage} = this.props.intl;
|
|
||||||
var displayName = ReactDOM.findDOMNode(this.refs.name).value.trim();
|
var displayName = ReactDOM.findDOMNode(this.refs.name).value.trim();
|
||||||
if (!displayName) {
|
if (!displayName) {
|
||||||
this.setState({nameError: formatMessage(holders.required)});
|
this.setState({nameError: Utils.localizeMessage('create_team.display_name.required', 'This field is required')});
|
||||||
return;
|
return;
|
||||||
} else if (displayName.length < 4 || displayName.length > 15) {
|
} else if (displayName.length < Constants.MIN_TEAMNAME_LENGTH || displayName.length > Constants.MAX_TEAMNAME_LENGTH) {
|
||||||
this.setState({nameError: formatMessage(holders.charLength)});
|
this.setState({nameError: Utils.localizeMessage('create_team.display_name.charLength', 'Name must be 4 or more characters up to a maximum of 15')});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.props.state.wizard = 'team_url';
|
this.props.state.wizard = 'team_url';
|
||||||
this.props.state.team.display_name = displayName;
|
this.props.state.team.display_name = displayName;
|
||||||
this.props.state.team.name = utils.cleanUpUrlable(displayName);
|
this.props.state.team.name = Utils.cleanUpUrlable(displayName);
|
||||||
this.props.updateParent(this.props.state);
|
this.props.updateParent(this.props.state);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +46,7 @@ class TeamSignupDisplayNamePage extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
Client.track('signup', 'signup_team_02_name');
|
track('signup', 'signup_team_02_name');
|
||||||
|
|
||||||
var nameError = null;
|
var nameError = null;
|
||||||
var nameDivClass = 'form-group';
|
var nameDivClass = 'form-group';
|
||||||
@@ -128,9 +117,6 @@ class TeamSignupDisplayNamePage extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TeamSignupDisplayNamePage.propTypes = {
|
TeamSignupDisplayNamePage.propTypes = {
|
||||||
intl: intlShape.isRequired,
|
|
||||||
state: React.PropTypes.object,
|
state: React.PropTypes.object,
|
||||||
updateParent: React.PropTypes.func
|
updateParent: React.PropTypes.func
|
||||||
};
|
};
|
||||||
|
|
||||||
export default injectIntl(TeamSignupDisplayNamePage);
|
|
||||||
|
|||||||
@@ -2,45 +2,20 @@
|
|||||||
// See License.txt for license information.
|
// See License.txt for license information.
|
||||||
|
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import ReactDOM from 'react-dom';
|
|
||||||
import * as Utils from 'utils/utils.jsx';
|
|
||||||
import Client from 'utils/web_client.jsx';
|
|
||||||
import * as AsyncClient from 'utils/async_client.jsx';
|
|
||||||
import TeamStore from 'stores/team_store.jsx';
|
|
||||||
import UserStore from 'stores/user_store.jsx';
|
|
||||||
import Constants from 'utils/constants.jsx';
|
|
||||||
import {browserHistory} from 'react-router';
|
|
||||||
|
|
||||||
import {injectIntl, intlShape, defineMessages, FormattedMessage, FormattedHTMLMessage} from 'react-intl';
|
import * as Utils from 'utils/utils.jsx';
|
||||||
|
|
||||||
|
import {checkIfTeamExists, createTeam} from 'actions/team_actions.jsx';
|
||||||
|
import {track} from 'actions/analytics_actions.jsx';
|
||||||
|
import Constants from 'utils/constants.jsx';
|
||||||
|
|
||||||
import logoImage from 'images/logo.png';
|
import logoImage from 'images/logo.png';
|
||||||
|
|
||||||
const holders = defineMessages({
|
|
||||||
required: {
|
|
||||||
id: 'create_team.team_url.required',
|
|
||||||
defaultMessage: 'This field is required'
|
|
||||||
},
|
|
||||||
regex: {
|
|
||||||
id: 'create_team.team_url.regex',
|
|
||||||
defaultMessage: "Use only lower case letters, numbers and dashes. Must start with a letter and can't end in a dash."
|
|
||||||
},
|
|
||||||
charLength: {
|
|
||||||
id: 'create_team.team_url.charLength',
|
|
||||||
defaultMessage: 'Name must be 4 or more characters up to a maximum of 15'
|
|
||||||
},
|
|
||||||
taken: {
|
|
||||||
id: 'create_team.team_url.taken',
|
|
||||||
defaultMessage: 'URL is taken or contains a reserved word'
|
|
||||||
},
|
|
||||||
unavailable: {
|
|
||||||
id: 'create_team.team_url.unavailable',
|
|
||||||
defaultMessage: 'This URL is unavailable. Please try another.'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import ReactDOM from 'react-dom';
|
||||||
|
import {FormattedMessage, FormattedHTMLMessage} from 'react-intl';
|
||||||
|
|
||||||
class TeamUrl extends React.Component {
|
export default class TeamUrl extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
@@ -58,10 +33,9 @@ class TeamUrl extends React.Component {
|
|||||||
submitNext(e) {
|
submitNext(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
const {formatMessage} = this.props.intl;
|
|
||||||
const name = ReactDOM.findDOMNode(this.refs.name).value.trim();
|
const name = ReactDOM.findDOMNode(this.refs.name).value.trim();
|
||||||
if (!name) {
|
if (!name) {
|
||||||
this.setState({nameError: formatMessage(holders.required)});
|
this.setState({nameError: Utils.localizeMessage('create_team.team_url.required', 'This field is required')});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -69,17 +43,17 @@ class TeamUrl extends React.Component {
|
|||||||
|
|
||||||
const urlRegex = /^[a-z]+([a-z\-0-9]+|(__)?)[a-z0-9]+$/g;
|
const urlRegex = /^[a-z]+([a-z\-0-9]+|(__)?)[a-z0-9]+$/g;
|
||||||
if (cleanedName !== name || !urlRegex.test(name)) {
|
if (cleanedName !== name || !urlRegex.test(name)) {
|
||||||
this.setState({nameError: formatMessage(holders.regex)});
|
this.setState({nameError: Utils.localizeMessage('create_team.team_url.regex', "Use only lower case letters, numbers and dashes. Must start with a letter and can't end in a dash.")});
|
||||||
return;
|
return;
|
||||||
} else if (cleanedName.length < 4 || cleanedName.length > 15) {
|
} else if (cleanedName.length < Constants.MIN_TEAMNAME_LENGTH || cleanedName.length > Constants.MAX_TEAMNAME_LENGTH) {
|
||||||
this.setState({nameError: formatMessage(holders.charLength)});
|
this.setState({nameError: Utils.localizeMessage('create_team.team_url.charLength', 'Name must be 4 or more characters up to a maximum of 15')});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (global.window.mm_config.RestrictTeamNames === 'true') {
|
if (global.window.mm_config.RestrictTeamNames === 'true') {
|
||||||
for (let index = 0; index < Constants.RESERVED_TEAM_NAMES.length; index++) {
|
for (let index = 0; index < Constants.RESERVED_TEAM_NAMES.length; index++) {
|
||||||
if (cleanedName.indexOf(Constants.RESERVED_TEAM_NAMES[index]) === 0) {
|
if (cleanedName.indexOf(Constants.RESERVED_TEAM_NAMES[index]) === 0) {
|
||||||
this.setState({nameError: formatMessage(holders.taken)});
|
this.setState({nameError: Utils.localizeMessage('create_team.team_url.taken', 'URL is taken or contains a reserved word')});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -90,30 +64,24 @@ class TeamUrl extends React.Component {
|
|||||||
teamSignup.team.type = 'O';
|
teamSignup.team.type = 'O';
|
||||||
teamSignup.team.name = name;
|
teamSignup.team.name = name;
|
||||||
|
|
||||||
Client.findTeamByName(name,
|
checkIfTeamExists(name,
|
||||||
(findTeam) => {
|
(foundTeam) => {
|
||||||
if (findTeam) {
|
if (foundTeam) {
|
||||||
this.setState({nameError: formatMessage(holders.unavailable)});
|
this.setState({nameError: Utils.localizeMessage('create_team.team_url.unavailable', 'This URL is unavailable. Please try another.')});
|
||||||
$('#finish-button').button('reset');
|
|
||||||
} else {
|
|
||||||
Client.createTeam(teamSignup.team,
|
|
||||||
(team) => {
|
|
||||||
Client.track('signup', 'signup_team_08_complete');
|
|
||||||
$('#sign-up-button').button('reset');
|
|
||||||
AsyncClient.getDirectProfiles();
|
|
||||||
TeamStore.saveTeam(team);
|
|
||||||
TeamStore.appendTeamMember({team_id: team.id, user_id: UserStore.getCurrentId(), roles: 'admin'});
|
|
||||||
TeamStore.emitChange();
|
|
||||||
browserHistory.push('/' + team.name + '/channels/town-square');
|
|
||||||
},
|
|
||||||
(err) => {
|
|
||||||
this.setState({nameError: err.message});
|
|
||||||
$('#finish-button').button('reset');
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
$('#finish-button').button('reset');
|
$('#finish-button').button('reset');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
createTeam(teamSignup.team,
|
||||||
|
() => {
|
||||||
|
track('signup', 'signup_team_08_complete');
|
||||||
|
$('#sign-up-button').button('reset');
|
||||||
|
},
|
||||||
|
(err) => {
|
||||||
|
this.setState({nameError: err.message});
|
||||||
|
$('#finish-button').button('reset');
|
||||||
|
}
|
||||||
|
);
|
||||||
},
|
},
|
||||||
(err) => {
|
(err) => {
|
||||||
this.setState({nameError: err.message});
|
this.setState({nameError: err.message});
|
||||||
@@ -121,15 +89,17 @@ class TeamUrl extends React.Component {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleFocus(e) {
|
handleFocus(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
e.currentTarget.select();
|
e.currentTarget.select();
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
$('body').tooltip({selector: '[data-toggle=tooltip]', trigger: 'hover click'});
|
$('body').tooltip({selector: '[data-toggle=tooltip]', trigger: 'hover click'});
|
||||||
|
|
||||||
Client.track('signup', 'signup_team_03_url');
|
track('signup', 'signup_team_03_url');
|
||||||
|
|
||||||
let nameError = null;
|
let nameError = null;
|
||||||
let nameDivClass = 'form-group';
|
let nameDivClass = 'form-group';
|
||||||
@@ -223,9 +193,6 @@ class TeamUrl extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TeamUrl.propTypes = {
|
TeamUrl.propTypes = {
|
||||||
intl: intlShape.isRequired,
|
|
||||||
state: React.PropTypes.object,
|
state: React.PropTypes.object,
|
||||||
updateParent: React.PropTypes.func
|
updateParent: React.PropTypes.func
|
||||||
};
|
};
|
||||||
|
|
||||||
export default injectIntl(TeamUrl);
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {browserHistory, Link} from 'react-router';
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
export default class CreateTeam extends React.Component {
|
export default class CreateTeamController extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
@@ -67,6 +67,6 @@ export default class CreateTeam extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CreateTeam.propTypes = {
|
CreateTeamController.propTypes = {
|
||||||
children: React.PropTypes.node
|
children: React.PropTypes.node
|
||||||
};
|
};
|
||||||
@@ -5,7 +5,7 @@ import $ from 'jquery';
|
|||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
import Client from 'utils/web_client.jsx';
|
import Client from 'utils/web_client.jsx';
|
||||||
import * as AsyncClient from 'utils/async_client.jsx';
|
import * as AsyncClient from 'utils/async_client.jsx';
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
import Textbox from './textbox.jsx';
|
import Textbox from './textbox.jsx';
|
||||||
import BrowserStore from 'stores/browser_store.jsx';
|
import BrowserStore from 'stores/browser_store.jsx';
|
||||||
import PostStore from 'stores/post_store.jsx';
|
import PostStore from 'stores/post_store.jsx';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import * as utils from 'utils/utils.jsx';
|
|||||||
import Constants from 'utils/constants.jsx';
|
import Constants from 'utils/constants.jsx';
|
||||||
const ActionTypes = Constants.ActionTypes;
|
const ActionTypes = Constants.ActionTypes;
|
||||||
import Client from 'utils/web_client.jsx';
|
import Client from 'utils/web_client.jsx';
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
import ModalStore from 'stores/modal_store.jsx';
|
import ModalStore from 'stores/modal_store.jsx';
|
||||||
import UserStore from 'stores/user_store.jsx';
|
import UserStore from 'stores/user_store.jsx';
|
||||||
import ChannelStore from 'stores/channel_store.jsx';
|
import ChannelStore from 'stores/channel_store.jsx';
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import UserStore from 'stores/user_store.jsx';
|
|||||||
import BrowserStore from 'stores/browser_store.jsx';
|
import BrowserStore from 'stores/browser_store.jsx';
|
||||||
import PreferenceStore from 'stores/preference_store.jsx';
|
import PreferenceStore from 'stores/preference_store.jsx';
|
||||||
import * as Utils from 'utils/utils.jsx';
|
import * as Utils from 'utils/utils.jsx';
|
||||||
import * as Websockets from 'action_creators/websocket_actions.jsx';
|
import * as Websockets from 'actions/websocket_actions.jsx';
|
||||||
import Constants from 'utils/constants.jsx';
|
import Constants from 'utils/constants.jsx';
|
||||||
|
|
||||||
import {browserHistory} from 'react-router';
|
import {browserHistory} from 'react-router';
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import LoginMfa from './components/login_mfa.jsx';
|
|||||||
import ErrorBar from 'components/error_bar.jsx';
|
import ErrorBar from 'components/error_bar.jsx';
|
||||||
import FormError from 'components/form_error.jsx';
|
import FormError from 'components/form_error.jsx';
|
||||||
|
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
import UserStore from 'stores/user_store.jsx';
|
import UserStore from 'stores/user_store.jsx';
|
||||||
|
|
||||||
import Client from 'utils/web_client.jsx';
|
import Client from 'utils/web_client.jsx';
|
||||||
@@ -21,7 +21,7 @@ import {browserHistory, Link} from 'react-router';
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import logoImage from 'images/logo.png';
|
import logoImage from 'images/logo.png';
|
||||||
|
|
||||||
export default class Login extends React.Component {
|
export default class LoginController extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
@@ -446,8 +446,8 @@ export default class Login extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Login.defaultProps = {
|
LoginController.defaultProps = {
|
||||||
};
|
};
|
||||||
Login.propTypes = {
|
LoginController.propTypes = {
|
||||||
params: React.PropTypes.object.isRequired
|
params: React.PropTypes.object.isRequired
|
||||||
};
|
};
|
||||||
@@ -9,7 +9,7 @@ import ChannelStore from 'stores/channel_store.jsx';
|
|||||||
|
|
||||||
import * as Utils from 'utils/utils.jsx';
|
import * as Utils from 'utils/utils.jsx';
|
||||||
import * as AsyncClient from 'utils/async_client.jsx';
|
import * as AsyncClient from 'utils/async_client.jsx';
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
|
|
||||||
import {FormattedMessage} from 'react-intl';
|
import {FormattedMessage} from 'react-intl';
|
||||||
import {browserHistory} from 'react-router';
|
import {browserHistory} from 'react-router';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import FilteredUserList from './filtered_user_list.jsx';
|
|||||||
import UserStore from 'stores/user_store.jsx';
|
import UserStore from 'stores/user_store.jsx';
|
||||||
import TeamStore from 'stores/team_store.jsx';
|
import TeamStore from 'stores/team_store.jsx';
|
||||||
import * as Utils from 'utils/utils.jsx';
|
import * as Utils from 'utils/utils.jsx';
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
|
|
||||||
import {FormattedMessage} from 'react-intl';
|
import {FormattedMessage} from 'react-intl';
|
||||||
import {browserHistory} from 'react-router';
|
import {browserHistory} from 'react-router';
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ import {Link, browserHistory} from 'react-router';
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
|
|
||||||
export default class Navbar extends React.Component {
|
export default class Navbar extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
@@ -687,4 +687,4 @@ Navbar.defaultProps = {
|
|||||||
};
|
};
|
||||||
Navbar.propTypes = {
|
Navbar.propTypes = {
|
||||||
teamDisplayName: React.PropTypes.string
|
teamDisplayName: React.PropTypes.string
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
import * as Utils from 'utils/utils.jsx';
|
import * as Utils from 'utils/utils.jsx';
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
|
|
||||||
import TeamStore from 'stores/team_store.jsx';
|
import TeamStore from 'stores/team_store.jsx';
|
||||||
import UserStore from 'stores/user_store.jsx';
|
import UserStore from 'stores/user_store.jsx';
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import TeamStore from 'stores/team_store.jsx';
|
|||||||
import UserStore from 'stores/user_store.jsx';
|
import UserStore from 'stores/user_store.jsx';
|
||||||
import PreferenceStore from 'stores/preference_store.jsx';
|
import PreferenceStore from 'stores/preference_store.jsx';
|
||||||
import ChannelStore from 'stores/channel_store.jsx';
|
import ChannelStore from 'stores/channel_store.jsx';
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
import Constants from 'utils/constants.jsx';
|
import Constants from 'utils/constants.jsx';
|
||||||
const TutorialSteps = Constants.TutorialSteps;
|
const TutorialSteps = Constants.TutorialSteps;
|
||||||
const Preferences = Constants.Preferences;
|
const Preferences = Constants.Preferences;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import PostsView from './posts_view.jsx';
|
|||||||
|
|
||||||
import PostStore from 'stores/post_store.jsx';
|
import PostStore from 'stores/post_store.jsx';
|
||||||
import ChannelStore from 'stores/channel_store.jsx';
|
import ChannelStore from 'stores/channel_store.jsx';
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import * as Utils from 'utils/utils.jsx';
|
import * as Utils from 'utils/utils.jsx';
|
||||||
import TimeSince from './time_since.jsx';
|
import TimeSince from './time_since.jsx';
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
import TeamStore from 'stores/team_store.jsx';
|
import TeamStore from 'stores/team_store.jsx';
|
||||||
import UserStore from 'stores/user_store.jsx';
|
import UserStore from 'stores/user_store.jsx';
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import $ from 'jquery';
|
|||||||
import Post from './post.jsx';
|
import Post from './post.jsx';
|
||||||
import FloatingTimestamp from './floating_timestamp.jsx';
|
import FloatingTimestamp from './floating_timestamp.jsx';
|
||||||
|
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
|
|
||||||
import PreferenceStore from 'stores/preference_store.jsx';
|
import PreferenceStore from 'stores/preference_store.jsx';
|
||||||
import UserStore from 'stores/user_store.jsx';
|
import UserStore from 'stores/user_store.jsx';
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import LoadingScreen from './loading_screen.jsx';
|
|||||||
import ChannelStore from 'stores/channel_store.jsx';
|
import ChannelStore from 'stores/channel_store.jsx';
|
||||||
import PostStore from 'stores/post_store.jsx';
|
import PostStore from 'stores/post_store.jsx';
|
||||||
|
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
|
|
||||||
import Constants from 'utils/constants.jsx';
|
import Constants from 'utils/constants.jsx';
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import PendingPostActions from './pending_post_actions.jsx';
|
|||||||
import TeamStore from 'stores/team_store.jsx';
|
import TeamStore from 'stores/team_store.jsx';
|
||||||
import UserStore from 'stores/user_store.jsx';
|
import UserStore from 'stores/user_store.jsx';
|
||||||
|
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
|
|
||||||
import * as TextFormatting from 'utils/text_formatting.jsx';
|
import * as TextFormatting from 'utils/text_formatting.jsx';
|
||||||
import * as Utils from 'utils/utils.jsx';
|
import * as Utils from 'utils/utils.jsx';
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
import AppDispatcher from '../dispatcher/app_dispatcher.jsx';
|
import AppDispatcher from '../dispatcher/app_dispatcher.jsx';
|
||||||
import Constants from 'utils/constants.jsx';
|
import Constants from 'utils/constants.jsx';
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
|
|
||||||
import {FormattedMessage} from 'react-intl';
|
import {FormattedMessage} from 'react-intl';
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import * as TextFormatting from 'utils/text_formatting.jsx';
|
|||||||
import * as Utils from 'utils/utils.jsx';
|
import * as Utils from 'utils/utils.jsx';
|
||||||
import FileAttachmentList from './file_attachment_list.jsx';
|
import FileAttachmentList from './file_attachment_list.jsx';
|
||||||
import PostBodyAdditionalContent from './post_body_additional_content.jsx';
|
import PostBodyAdditionalContent from './post_body_additional_content.jsx';
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
|
|
||||||
import Constants from 'utils/constants.jsx';
|
import Constants from 'utils/constants.jsx';
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
//import $ from 'jquery';
|
//import $ from 'jquery';
|
||||||
//import Client from 'utils/web_client.jsx';
|
//import Client from 'utils/web_client.jsx';
|
||||||
|
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
import LocalizationStore from 'stores/localization_store.jsx';
|
import LocalizationStore from 'stores/localization_store.jsx';
|
||||||
|
|
||||||
import {IntlProvider} from 'react-intl';
|
import {IntlProvider} from 'react-intl';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import UserProfile from './user_profile.jsx';
|
|||||||
|
|
||||||
import UserStore from 'stores/user_store.jsx';
|
import UserStore from 'stores/user_store.jsx';
|
||||||
|
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
import AppDispatcher from '../dispatcher/app_dispatcher.jsx';
|
import AppDispatcher from '../dispatcher/app_dispatcher.jsx';
|
||||||
import * as TextFormatting from 'utils/text_formatting.jsx';
|
import * as TextFormatting from 'utils/text_formatting.jsx';
|
||||||
import * as Utils from 'utils/utils.jsx';
|
import * as Utils from 'utils/utils.jsx';
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import * as Utils from 'utils/utils.jsx';
|
|||||||
import ErrorBar from 'components/error_bar.jsx';
|
import ErrorBar from 'components/error_bar.jsx';
|
||||||
import LoadingScreen from 'components/loading_screen.jsx';
|
import LoadingScreen from 'components/loading_screen.jsx';
|
||||||
import * as AsyncClient from 'utils/async_client.jsx';
|
import * as AsyncClient from 'utils/async_client.jsx';
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
|
|
||||||
import {Link} from 'react-router';
|
import {Link} from 'react-router';
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import UserStore from 'stores/user_store.jsx';
|
|||||||
import TeamStore from 'stores/team_store.jsx';
|
import TeamStore from 'stores/team_store.jsx';
|
||||||
import PreferenceStore from 'stores/preference_store.jsx';
|
import PreferenceStore from 'stores/preference_store.jsx';
|
||||||
|
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
import * as Utils from 'utils/utils.jsx';
|
import * as Utils from 'utils/utils.jsx';
|
||||||
import Constants from 'utils/constants.jsx';
|
import Constants from 'utils/constants.jsx';
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,9 @@
|
|||||||
|
|
||||||
import FormError from 'components/form_error.jsx';
|
import FormError from 'components/form_error.jsx';
|
||||||
import LoadingScreen from 'components/loading_screen.jsx';
|
import LoadingScreen from 'components/loading_screen.jsx';
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
|
||||||
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
|
import {track} from 'actions/analytics_actions.jsx';
|
||||||
|
|
||||||
import BrowserStore from 'stores/browser_store.jsx';
|
import BrowserStore from 'stores/browser_store.jsx';
|
||||||
import UserStore from 'stores/user_store.jsx';
|
import UserStore from 'stores/user_store.jsx';
|
||||||
@@ -12,11 +14,10 @@ import * as Utils from 'utils/utils.jsx';
|
|||||||
import Client from 'utils/web_client.jsx';
|
import Client from 'utils/web_client.jsx';
|
||||||
import Constants from 'utils/constants.jsx';
|
import Constants from 'utils/constants.jsx';
|
||||||
|
|
||||||
import {FormattedMessage, FormattedHTMLMessage} from 'react-intl';
|
|
||||||
import {browserHistory, Link} from 'react-router';
|
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
|
import {FormattedMessage, FormattedHTMLMessage} from 'react-intl';
|
||||||
|
import {browserHistory, Link} from 'react-router';
|
||||||
|
|
||||||
import logoImage from 'images/logo.png';
|
import logoImage from 'images/logo.png';
|
||||||
|
|
||||||
@@ -199,7 +200,7 @@ export default class SignupUserComplete extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleUserCreated(user, data) {
|
handleUserCreated(user, data) {
|
||||||
Client.track('signup', 'signup_user_02_complete');
|
track('signup', 'signup_user_02_complete');
|
||||||
Client.loginById(
|
Client.loginById(
|
||||||
data.id,
|
data.id,
|
||||||
user.password,
|
user.password,
|
||||||
@@ -405,7 +406,7 @@ export default class SignupUserComplete extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
Client.track('signup', 'signup_user_01_welcome');
|
track('signup', 'signup_user_01_welcome');
|
||||||
|
|
||||||
// If we have been used then just display a message
|
// If we have been used then just display a message
|
||||||
if (this.state.usedBefore) {
|
if (this.state.usedBefore) {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import $ from 'jquery';
|
|||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
|
|
||||||
import Constants from 'utils/constants.jsx';
|
import Constants from 'utils/constants.jsx';
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
import SuggestionStore from 'stores/suggestion_store.jsx';
|
import SuggestionStore from 'stores/suggestion_store.jsx';
|
||||||
import * as Utils from 'utils/utils.jsx';
|
import * as Utils from 'utils/utils.jsx';
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
import SuggestionStore from 'stores/suggestion_store.jsx';
|
import SuggestionStore from 'stores/suggestion_store.jsx';
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import TeamStore from 'stores/team_store.jsx';
|
|||||||
import PreferenceStore from 'stores/preference_store.jsx';
|
import PreferenceStore from 'stores/preference_store.jsx';
|
||||||
import * as Utils from 'utils/utils.jsx';
|
import * as Utils from 'utils/utils.jsx';
|
||||||
import * as AsyncClient from 'utils/async_client.jsx';
|
import * as AsyncClient from 'utils/async_client.jsx';
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
|
|
||||||
import Constants from 'utils/constants.jsx';
|
import Constants from 'utils/constants.jsx';
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import SettingItemMax from '../setting_item_max.jsx';
|
|||||||
|
|
||||||
import Client from 'utils/web_client.jsx';
|
import Client from 'utils/web_client.jsx';
|
||||||
import * as I18n from 'i18n/i18n.jsx';
|
import * as I18n from 'i18n/i18n.jsx';
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
|
|
||||||
import {FormattedMessage} from 'react-intl';
|
import {FormattedMessage} from 'react-intl';
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
import SettingItemMin from '../setting_item_min.jsx';
|
import SettingItemMin from '../setting_item_min.jsx';
|
||||||
import SettingItemMax from '../setting_item_max.jsx';
|
import SettingItemMax from '../setting_item_max.jsx';
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
|
|
||||||
import {intlShape, injectIntl, defineMessages, FormattedMessage} from 'react-intl';
|
import {intlShape, injectIntl, defineMessages, FormattedMessage} from 'react-intl';
|
||||||
|
|
||||||
@@ -135,4 +135,4 @@ DeveloperTab.propTypes = {
|
|||||||
collapseModal: React.PropTypes.func.isRequired
|
collapseModal: React.PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
export default injectIntl(DeveloperTab);
|
export default injectIntl(DeveloperTab);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import * as AsyncClient from 'utils/async_client.jsx';
|
import * as AsyncClient from 'utils/async_client.jsx';
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
import * as Utils from 'utils/utils.jsx';
|
import * as Utils from 'utils/utils.jsx';
|
||||||
import AudioVideoPreview from './audio_video_preview.jsx';
|
import AudioVideoPreview from './audio_video_preview.jsx';
|
||||||
import Constants from 'utils/constants.jsx';
|
import Constants from 'utils/constants.jsx';
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ import * as Utils from 'utils/utils.jsx';
|
|||||||
|
|
||||||
import Client from 'utils/web_client.jsx';
|
import Client from 'utils/web_client.jsx';
|
||||||
|
|
||||||
import * as Websockets from 'action_creators/websocket_actions.jsx';
|
import * as Websockets from 'actions/websocket_actions.jsx';
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
import SignupUserComplete from 'components/signup_user_complete.jsx';
|
import SignupUserComplete from 'components/signup_user_complete.jsx';
|
||||||
import ShouldVerifyEmail from 'components/should_verify_email.jsx';
|
import ShouldVerifyEmail from 'components/should_verify_email.jsx';
|
||||||
import DoVerifyEmail from 'components/do_verify_email.jsx';
|
import DoVerifyEmail from 'components/do_verify_email.jsx';
|
||||||
@@ -82,15 +82,15 @@ import LicenseSettings from 'components/admin_console/license_settings.jsx';
|
|||||||
import Audits from 'components/admin_console/audits.jsx';
|
import Audits from 'components/admin_console/audits.jsx';
|
||||||
import Logs from 'components/admin_console/logs.jsx';
|
import Logs from 'components/admin_console/logs.jsx';
|
||||||
|
|
||||||
import Claim from 'components/claim/claim.jsx';
|
import ClaimController from 'components/claim/claim_controller.jsx';
|
||||||
import EmailToOAuth from 'components/claim/components/email_to_oauth.jsx';
|
import EmailToOAuth from 'components/claim/components/email_to_oauth.jsx';
|
||||||
import OAuthToEmail from 'components/claim/components/oauth_to_email.jsx';
|
import OAuthToEmail from 'components/claim/components/oauth_to_email.jsx';
|
||||||
import LDAPToEmail from 'components/claim/components/ldap_to_email.jsx';
|
import LDAPToEmail from 'components/claim/components/ldap_to_email.jsx';
|
||||||
import EmailToLDAP from 'components/claim/components/email_to_ldap.jsx';
|
import EmailToLDAP from 'components/claim/components/email_to_ldap.jsx';
|
||||||
|
|
||||||
import Login from 'components/login/login.jsx';
|
import LoginController from 'components/login/login_controller.jsx';
|
||||||
import SelectTeam from 'components/select_team/select_team.jsx';
|
import SelectTeam from 'components/select_team/select_team.jsx';
|
||||||
import CreateTeam from 'components/create_team/create_team.jsx';
|
import CreateTeamController from 'components/create_team/create_team_controller.jsx';
|
||||||
import CreateTeamDisplayName from 'components/create_team/components/display_name.jsx';
|
import CreateTeamDisplayName from 'components/create_team/components/display_name.jsx';
|
||||||
import CreateTeamTeamUrl from 'components/create_team/components/team_url.jsx';
|
import CreateTeamTeamUrl from 'components/create_team/components/team_url.jsx';
|
||||||
|
|
||||||
@@ -279,7 +279,7 @@ function renderRootComponent() {
|
|||||||
<Route component={HeaderFooterTemplate}>
|
<Route component={HeaderFooterTemplate}>
|
||||||
<Route
|
<Route
|
||||||
path='login'
|
path='login'
|
||||||
component={Login}
|
component={LoginController}
|
||||||
/>
|
/>
|
||||||
<Route
|
<Route
|
||||||
path='reset_password'
|
path='reset_password'
|
||||||
@@ -291,7 +291,7 @@ function renderRootComponent() {
|
|||||||
/>
|
/>
|
||||||
<Route
|
<Route
|
||||||
path='claim'
|
path='claim'
|
||||||
component={Claim}
|
component={ClaimController}
|
||||||
>
|
>
|
||||||
<Route
|
<Route
|
||||||
path='oauth_to_email'
|
path='oauth_to_email'
|
||||||
@@ -334,7 +334,7 @@ function renderRootComponent() {
|
|||||||
/>
|
/>
|
||||||
<Route
|
<Route
|
||||||
path='create_team'
|
path='create_team'
|
||||||
component={CreateTeam}
|
component={CreateTeamController}
|
||||||
>
|
>
|
||||||
<IndexRoute component={CreateTeamDisplayName}/>
|
<IndexRoute component={CreateTeamDisplayName}/>
|
||||||
<Route
|
<Route
|
||||||
|
|||||||
@@ -177,6 +177,11 @@ TeamStore.dispatchToken = AppDispatcher.register((payload) => {
|
|||||||
TeamStore.saveMyTeam(action.team);
|
TeamStore.saveMyTeam(action.team);
|
||||||
TeamStore.emitChange();
|
TeamStore.emitChange();
|
||||||
break;
|
break;
|
||||||
|
case ActionTypes.CREATED_TEAM:
|
||||||
|
TeamStore.saveTeam(action.team);
|
||||||
|
TeamStore.appendTeamMember(action.member);
|
||||||
|
TeamStore.emitChange();
|
||||||
|
break;
|
||||||
case ActionTypes.RECEIVED_ALL_TEAMS:
|
case ActionTypes.RECEIVED_ALL_TEAMS:
|
||||||
TeamStore.saveTeams(action.teams);
|
TeamStore.saveTeams(action.teams);
|
||||||
TeamStore.emitChange();
|
TeamStore.emitChange();
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import Client from './web_client.jsx';
|
import Client from './web_client.jsx';
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
import AppDispatcher from '../dispatcher/app_dispatcher.jsx';
|
import AppDispatcher from '../dispatcher/app_dispatcher.jsx';
|
||||||
import BrowserStore from 'stores/browser_store.jsx';
|
import BrowserStore from 'stores/browser_store.jsx';
|
||||||
import ChannelStore from 'stores/channel_store.jsx';
|
import ChannelStore from 'stores/channel_store.jsx';
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import ToggleModalButton from 'components/toggle_modal_button.jsx';
|
|||||||
import UserProfile from 'components/user_profile.jsx';
|
import UserProfile from 'components/user_profile.jsx';
|
||||||
import ChannelStore from 'stores/channel_store.jsx';
|
import ChannelStore from 'stores/channel_store.jsx';
|
||||||
import Constants from 'utils/constants.jsx';
|
import Constants from 'utils/constants.jsx';
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
import Client from 'utils/web_client.jsx';
|
import Client from 'utils/web_client.jsx';
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ export default {
|
|||||||
RECEIVED_MSG: null,
|
RECEIVED_MSG: null,
|
||||||
|
|
||||||
RECEIVED_MY_TEAM: null,
|
RECEIVED_MY_TEAM: null,
|
||||||
|
CREATED_TEAM: null,
|
||||||
|
|
||||||
RECEIVED_CONFIG: null,
|
RECEIVED_CONFIG: null,
|
||||||
RECEIVED_LOGS: null,
|
RECEIVED_LOGS: null,
|
||||||
@@ -723,6 +724,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
OVERLAY_TIME_DELAY: 400,
|
OVERLAY_TIME_DELAY: 400,
|
||||||
|
MIN_TEAMNAME_LENGTH: 4,
|
||||||
|
MAX_TEAMNAME_LENGTH: 15,
|
||||||
MIN_USERNAME_LENGTH: 3,
|
MIN_USERNAME_LENGTH: 3,
|
||||||
MAX_USERNAME_LENGTH: 22,
|
MAX_USERNAME_LENGTH: 22,
|
||||||
MIN_PASSWORD_LENGTH: 5,
|
MIN_PASSWORD_LENGTH: 5,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import Client from 'mattermost/client.jsx';
|
import Client from 'mattermost/client.jsx';
|
||||||
import TeamStore from '../stores/team_store.jsx';
|
import TeamStore from '../stores/team_store.jsx';
|
||||||
import BrowserStore from '../stores/browser_store.jsx';
|
import BrowserStore from '../stores/browser_store.jsx';
|
||||||
import * as GlobalActions from 'action_creators/global_actions.jsx';
|
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||||
|
|
||||||
import request from 'superagent';
|
import request from 'superagent';
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user