From 12896bd23eeba79884245c1c29fdc568cf21a7fa Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Mon, 14 Mar 2016 08:50:46 -0400 Subject: Converting to Webpack. Stage 1. --- .../components/user_settings/user_settings.jsx | 158 --------------------- 1 file changed, 158 deletions(-) delete mode 100644 web/react/components/user_settings/user_settings.jsx (limited to 'web/react/components/user_settings/user_settings.jsx') diff --git a/web/react/components/user_settings/user_settings.jsx b/web/react/components/user_settings/user_settings.jsx deleted file mode 100644 index 4da51fa5f..000000000 --- a/web/react/components/user_settings/user_settings.jsx +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. -// See License.txt for license information. - -import UserStore from '../../stores/user_store.jsx'; -import * as utils from '../../utils/utils.jsx'; -import NotificationsTab from './user_settings_notifications.jsx'; -import SecurityTab from './user_settings_security.jsx'; -import GeneralTab from './user_settings_general.jsx'; -import DeveloperTab from './user_settings_developer.jsx'; -import IntegrationsTab from './user_settings_integrations.jsx'; -import DisplayTab from './user_settings_display.jsx'; -import AdvancedTab from './user_settings_advanced.jsx'; - -export default class UserSettings extends React.Component { - constructor(props) { - super(props); - - this.getActiveTab = this.getActiveTab.bind(this); - this.onListenerChange = this.onListenerChange.bind(this); - - this.state = {user: UserStore.getCurrentUser()}; - } - - componentDidMount() { - UserStore.addChangeListener(this.onListenerChange); - } - - componentWillUnmount() { - UserStore.removeChangeListener(this.onListenerChange); - } - - getActiveTab() { - return this.refs.activeTab; - } - - onListenerChange() { - var user = UserStore.getCurrentUser(); - if (!utils.areObjectsEqual(this.state.user, user)) { - this.setState({user}); - } - } - - render() { - if (this.props.activeTab === 'general') { - return ( -
- -
- ); - } else if (this.props.activeTab === 'security') { - return ( -
- -
- ); - } else if (this.props.activeTab === 'notifications') { - return ( -
- -
- ); - } else if (this.props.activeTab === 'developer') { - return ( -
- -
- ); - } else if (this.props.activeTab === 'integrations') { - return ( -
- -
- ); - } else if (this.props.activeTab === 'display') { - return ( -
- -
- ); - } else if (this.props.activeTab === 'advanced') { - return ( -
- -
- ); - } - - return
; - } -} - -UserSettings.propTypes = { - activeTab: React.PropTypes.string, - activeSection: React.PropTypes.string, - updateSection: React.PropTypes.func, - updateTab: React.PropTypes.func, - closeModal: React.PropTypes.func.isRequired, - collapseModal: React.PropTypes.func.isRequired, - setEnforceFocus: React.PropTypes.func.isRequired, - setRequireConfirm: React.PropTypes.func.isRequired -}; -- cgit v1.2.3-1-g7c22