summaryrefslogtreecommitdiffstats
path: root/web/react/components/user_settings/user_settings_modal.jsx
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2016-02-05 11:29:03 -0500
committerJoramWilander <jwawilander@gmail.com>2016-02-05 11:29:03 -0500
commitc90e224349eb6105ef1d3ecf20c519238ba5e018 (patch)
tree7d236728e41c6da131a2dd6c43b915c5f06149d1 /web/react/components/user_settings/user_settings_modal.jsx
parent8e79f12f3c6c0f8858addaf6f66ea6e88a965b65 (diff)
downloadchat-c90e224349eb6105ef1d3ecf20c519238ba5e018.tar.gz
chat-c90e224349eb6105ef1d3ecf20c519238ba5e018.tar.bz2
chat-c90e224349eb6105ef1d3ecf20c519238ba5e018.zip
Remove appearance settings tab and move theme management to display settings tab
Diffstat (limited to 'web/react/components/user_settings/user_settings_modal.jsx')
-rw-r--r--web/react/components/user_settings/user_settings_modal.jsx19
1 files changed, 11 insertions, 8 deletions
diff --git a/web/react/components/user_settings/user_settings_modal.jsx b/web/react/components/user_settings/user_settings_modal.jsx
index 2a0a90cf5..57796d559 100644
--- a/web/react/components/user_settings/user_settings_modal.jsx
+++ b/web/react/components/user_settings/user_settings_modal.jsx
@@ -2,9 +2,13 @@
// See License.txt for license information.
import ConfirmModal from '../confirm_modal.jsx';
-const Modal = ReactBootstrap.Modal;
-import SettingsSidebar from '../settings_sidebar.jsx';
import UserSettings from './user_settings.jsx';
+import SettingsSidebar from '../settings_sidebar.jsx';
+
+import UserStore from '../../stores/user_store.jsx';
+import * as Utils from '../../utils/utils.jsx';
+
+const Modal = ReactBootstrap.Modal;
import {intlShape, injectIntl, defineMessages, FormattedMessage} from 'mm-intl';
@@ -21,10 +25,6 @@ const holders = defineMessages({
id: 'user.settings.modal.notifications',
defaultMessage: 'Notifications'
},
- appearance: {
- id: 'user.settings.modal.appearance',
- defaultMessage: 'Appearance'
- },
developer: {
id: 'user.settings.modal.developer',
defaultMessage: 'Developer'
@@ -214,6 +214,10 @@ class UserSettingsModal extends React.Component {
if (!skipConfirm && this.requireConfirm) {
this.showConfirmModal(() => this.updateSection(section, true));
} else {
+ if (this.state.active_section === 'theme' && section !== 'theme') {
+ const user = UserStore.getCurrentUser();
+ Utils.applyTheme(user.theme_props);
+ }
this.setState({active_section: section});
}
}
@@ -224,7 +228,6 @@ class UserSettingsModal extends React.Component {
tabs.push({name: 'general', uiName: formatMessage(holders.general), icon: 'glyphicon glyphicon-cog'});
tabs.push({name: 'security', uiName: formatMessage(holders.security), icon: 'glyphicon glyphicon-lock'});
tabs.push({name: 'notifications', uiName: formatMessage(holders.notifications), icon: 'glyphicon glyphicon-exclamation-sign'});
- tabs.push({name: 'appearance', uiName: formatMessage(holders.appearance), icon: 'glyphicon glyphicon-wrench'});
if (global.window.mm_config.EnableOAuthServiceProvider === 'true') {
tabs.push({name: 'developer', uiName: formatMessage(holders.developer), icon: 'glyphicon glyphicon-th'});
}
@@ -294,4 +297,4 @@ UserSettingsModal.propTypes = {
onModalDismissed: React.PropTypes.func.isRequired
};
-export default injectIntl(UserSettingsModal); \ No newline at end of file
+export default injectIntl(UserSettingsModal);