mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Dark Mode: Remove feature flag (#14207)
This commit is contained in:
parent
a7ac83f9d3
commit
7f239997dc
@ -34,7 +34,6 @@ const metamaskrc = require('rc')('metamask', {
|
||||
INFURA_PROD_PROJECT_ID: process.env.INFURA_PROD_PROJECT_ID,
|
||||
ONBOARDING_V2: process.env.ONBOARDING_V2,
|
||||
COLLECTIBLES_V1: process.env.COLLECTIBLES_V1,
|
||||
DARK_MODE_V1: process.env.DARK_MODE_V1,
|
||||
TOKEN_DETECTION_V2: process.env.TOKEN_DETECTION_V2,
|
||||
SEGMENT_HOST: process.env.SEGMENT_HOST,
|
||||
SEGMENT_WRITE_KEY: process.env.SEGMENT_WRITE_KEY,
|
||||
@ -812,7 +811,6 @@ function getEnvironmentVariables({ buildType, devMode, testing, version }) {
|
||||
SWAPS_USE_DEV_APIS: process.env.SWAPS_USE_DEV_APIS === '1',
|
||||
ONBOARDING_V2: metamaskrc.ONBOARDING_V2 === '1',
|
||||
COLLECTIBLES_V1: metamaskrc.COLLECTIBLES_V1 === '1',
|
||||
DARK_MODE_V1: metamaskrc.DARK_MODE_V1 === '1',
|
||||
TOKEN_DETECTION_V2: metamaskrc.TOKEN_DETECTION_V2 === '1',
|
||||
};
|
||||
}
|
||||
|
@ -105,11 +105,9 @@ export default class Routes extends Component {
|
||||
};
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
if (process.env.DARK_MODE_V1) {
|
||||
const { theme } = this.props;
|
||||
if (theme !== prevProps.theme) {
|
||||
document.documentElement.setAttribute('data-theme', theme);
|
||||
}
|
||||
const { theme } = this.props;
|
||||
if (theme !== prevProps.theme) {
|
||||
document.documentElement.setAttribute('data-theme', theme);
|
||||
}
|
||||
}
|
||||
|
||||
@ -130,9 +128,7 @@ export default class Routes extends Component {
|
||||
pageChanged(locationObj.pathname);
|
||||
}
|
||||
});
|
||||
if (process.env.DARK_MODE_V1 && theme) {
|
||||
document.documentElement.setAttribute('data-theme', theme);
|
||||
}
|
||||
document.documentElement.setAttribute('data-theme', theme);
|
||||
}
|
||||
|
||||
renderRoutes() {
|
||||
@ -333,7 +329,6 @@ export default class Routes extends Component {
|
||||
isMouseUser,
|
||||
browserEnvironmentOs: os,
|
||||
browserEnvironmentBrowser: browser,
|
||||
theme,
|
||||
} = this.props;
|
||||
const loadMessage =
|
||||
loadingMessage || isNetworkLoading
|
||||
@ -345,7 +340,6 @@ export default class Routes extends Component {
|
||||
[`os-${os}`]: os,
|
||||
[`browser-${browser}`]: browser,
|
||||
'mouse-user-styles': isMouseUser,
|
||||
[`theme-${theme}`]: process.env.DARK_MODE_V1 && theme,
|
||||
})}
|
||||
dir={textDirection}
|
||||
onClick={() => setMouseUserState(true)}
|
||||
|
@ -9,9 +9,6 @@ import Dropdown from '../../../components/ui/dropdown';
|
||||
|
||||
import { THEME_TYPE } from './experimental-tab.constant';
|
||||
|
||||
/*eslint-disable prefer-destructuring*/
|
||||
const DARK_MODE_V1 = process.env.DARK_MODE_V1;
|
||||
|
||||
export default class ExperimentalTab extends PureComponent {
|
||||
static contextTypes = {
|
||||
t: PropTypes.func,
|
||||
@ -229,9 +226,6 @@ export default class ExperimentalTab extends PureComponent {
|
||||
}
|
||||
|
||||
renderTheme() {
|
||||
if (!DARK_MODE_V1) {
|
||||
return null;
|
||||
}
|
||||
const { t } = this.context;
|
||||
const { theme, setTheme } = this.props;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user