summaryrefslogtreecommitdiffstats
path: root/web/react/components/user_settings.jsx
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2015-09-21 14:22:23 -0400
committerJoramWilander <jwawilander@gmail.com>2015-09-21 14:22:23 -0400
commit98186e5018bbc604796d4f9762c93f4f75e2913f (patch)
treeb0a2c8309399b472fb846c5cec7aa46f9162b0f9 /web/react/components/user_settings.jsx
parent86429c7bd5bc16e3e7c868650e350f6469efeea1 (diff)
downloadchat-98186e5018bbc604796d4f9762c93f4f75e2913f.tar.gz
chat-98186e5018bbc604796d4f9762c93f4f75e2913f.tar.bz2
chat-98186e5018bbc604796d4f9762c93f4f75e2913f.zip
Implement incoming webhooks.
Diffstat (limited to 'web/react/components/user_settings.jsx')
-rw-r--r--web/react/components/user_settings.jsx100
1 files changed, 0 insertions, 100 deletions
diff --git a/web/react/components/user_settings.jsx b/web/react/components/user_settings.jsx
deleted file mode 100644
index 48b499068..000000000
--- a/web/react/components/user_settings.jsx
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved.
-// See License.txt for license information.
-
-var UserStore = require('../stores/user_store.jsx');
-var utils = require('../utils/utils.jsx');
-var NotificationsTab = require('./user_settings_notifications.jsx');
-var SecurityTab = require('./user_settings_security.jsx');
-var GeneralTab = require('./user_settings_general.jsx');
-var AppearanceTab = require('./user_settings_appearance.jsx');
-var DeveloperTab = require('./user_settings_developer.jsx');
-
-export default class UserSettings extends React.Component {
- constructor(props) {
- super(props);
-
- this.onListenerChange = this.onListenerChange.bind(this);
-
- this.state = {user: UserStore.getCurrentUser()};
- }
-
- componentDidMount() {
- UserStore.addChangeListener(this.onListenerChange);
- }
-
- componentWillUnmount() {
- UserStore.removeChangeListener(this.onListenerChange);
- }
-
- onListenerChange() {
- var user = UserStore.getCurrentUser();
- if (!utils.areStatesEqual(this.state.user, user)) {
- this.setState({user: user});
- }
- }
-
- render() {
- if (this.props.activeTab === 'general') {
- return (
- <div>
- <GeneralTab
- user={this.state.user}
- activeSection={this.props.activeSection}
- updateSection={this.props.updateSection}
- updateTab={this.props.updateTab}
- />
- </div>
- );
- } else if (this.props.activeTab === 'security') {
- return (
- <div>
- <SecurityTab
- user={this.state.user}
- activeSection={this.props.activeSection}
- updateSection={this.props.updateSection}
- updateTab={this.props.updateTab}
- />
- </div>
- );
- } else if (this.props.activeTab === 'notifications') {
- return (
- <div>
- <NotificationsTab
- user={this.state.user}
- activeSection={this.props.activeSection}
- updateSection={this.props.updateSection}
- updateTab={this.props.updateTab}
- />
- </div>
- );
- } else if (this.props.activeTab === 'appearance') {
- return (
- <div>
- <AppearanceTab
- activeSection={this.props.activeSection}
- updateSection={this.props.updateSection}
- updateTab={this.props.updateTab}
- />
- </div>
- );
- } else if (this.props.activeTab === 'developer') {
- return (
- <div>
- <DeveloperTab
- activeSection={this.props.activeSection}
- updateSection={this.props.updateSection}
- />
- </div>
- );
- }
-
- return <div/>;
- }
-}
-
-UserSettings.propTypes = {
- activeTab: React.PropTypes.string,
- activeSection: React.PropTypes.string,
- updateSection: React.PropTypes.func,
- updateTab: React.PropTypes.func
-};