From 79d4434c9f7c654aa89cdc5fe1211942244e5c9e Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 1 Oct 2019 15:20:11 +0200 Subject: [PATCH] remove custom color pickers --- .../tabs/user/GeneralUserSettingsTab.js | 49 ------------------- 1 file changed, 49 deletions(-) diff --git a/src/components/views/settings/tabs/user/GeneralUserSettingsTab.js b/src/components/views/settings/tabs/user/GeneralUserSettingsTab.js index 6d54df0b31..b9c566b22a 100644 --- a/src/components/views/settings/tabs/user/GeneralUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/GeneralUserSettingsTab.js @@ -270,21 +270,6 @@ export default class GeneralUserSettingsTab extends React.Component { _renderThemeSection() { const SettingsFlag = sdk.getComponent("views.elements.SettingsFlag"); - let customSection; - if (this.state.theme === "light-custom") { - customSection = (
- {_t("Custom theme colors")} - - - - - - - - - -
); - } return (
{_t("Theme")} @@ -295,7 +280,6 @@ export default class GeneralUserSettingsTab extends React.Component { })} - { customSection }
); } @@ -395,36 +379,3 @@ export default class GeneralUserSettingsTab extends React.Component { ); } } - -class CustomThemeColorField extends React.Component { - constructor(props) { - super(props); - this.state = {color: ""}; - } - - componentDidMount() { - setTimeout(() => { - const value = window.getComputedStyle(document.body).getPropertyValue(`--${this.props.name}`).trim(); - this.setState({color: value}); - }, 3000); - } - - _onColorChanged = (event) => { - const hex = event.target.value; - document.body.style.setProperty(`--${this.props.name}`, hex); - document.body.style.setProperty(`--${this.props.name}-0pct`, hex + "00"); - document.body.style.setProperty(`--${this.props.name}-50pct`, hex + "7F"); - this.setState({color: hex}); - } - - render() { - const id = `color-picker-${this.props.name}`; - return (
- - -
); - } -}