diff --git a/web/react/components/user_settings/code_theme_chooser.jsx b/web/react/components/user_settings/code_theme_chooser.jsx
deleted file mode 100644
index eef4b24bae..0000000000
--- a/web/react/components/user_settings/code_theme_chooser.jsx
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
-// See License.txt for license information.
-
-var Constants = require('../../utils/constants.jsx');
-
-export default class CodeThemeChooser extends React.Component {
- constructor(props) {
- super(props);
- this.state = {};
- }
- render() {
- const theme = this.props.theme;
-
- const premadeThemes = [];
- for (const k in Constants.CODE_THEMES) {
- if (Constants.CODE_THEMES.hasOwnProperty(k)) {
- let activeClass = '';
- if (k === theme.codeTheme) {
- activeClass = 'active';
- }
-
- premadeThemes.push(
-
-
this.props.updateTheme(k)}
- >
-
-
-
- );
- }
- }
-
- return (
-
- {premadeThemes}
-
- );
- }
-}
-
-CodeThemeChooser.propTypes = {
- theme: React.PropTypes.object.isRequired,
- updateTheme: React.PropTypes.func.isRequired
-};
diff --git a/web/react/components/user_settings/custom_theme_chooser.jsx b/web/react/components/user_settings/custom_theme_chooser.jsx
index 095e5b6226..986b0b2fd6 100644
--- a/web/react/components/user_settings/custom_theme_chooser.jsx
+++ b/web/react/components/user_settings/custom_theme_chooser.jsx
@@ -55,28 +55,68 @@ export default class CustomThemeChooser extends React.Component {
const elements = [];
let colors = '';
Constants.THEME_ELEMENTS.forEach((element, index) => {
- elements.push(
-
-
-
-
-
-
-
- );
+ if (element.id === 'codeTheme') {
+ const codeThemeOptions = [];
- colors += theme[element.id] + ',';
+ element.themes.forEach((codeTheme, codeThemeIndex) => {
+ codeThemeOptions.push(
+
+ );
+ });
+
+ elements.push(
+
+
+
+
+

+
+
+ );
+ } else {
+ elements.push(
+
+
+
+
+
+
+
+ );
+
+ colors += theme[element.id] + ',';
+ }
});
colors += theme.codeTheme;
@@ -87,6 +127,7 @@ export default class CustomThemeChooser extends React.Component {
{'Copy and paste to share theme colors:'}
{custom}
- {'Code Theme'}
-
-
{serverError}