|
@@ -7,7 +7,7 @@ import URL from '../constants/url.dev.json';
|
|
|
import 'whatwg-fetch';
|
|
import 'whatwg-fetch';
|
|
|
import { getThemeConfig, applyTheme } from './theme/applyTheme.js';
|
|
import { getThemeConfig, applyTheme } from './theme/applyTheme.js';
|
|
|
|
|
|
|
|
-import tempdata from '../data/testbar.json';
|
|
|
|
|
|
|
+import tempdata from '../data/temp.json';
|
|
|
|
|
|
|
|
class Factory extends React.Component {
|
|
class Factory extends React.Component {
|
|
|
|
|
|
|
@@ -35,9 +35,10 @@ class Factory extends React.Component {
|
|
|
return (response.json())
|
|
return (response.json())
|
|
|
}).then((json) => {
|
|
}).then((json) => {
|
|
|
let theme = json.theme || 'dark';
|
|
let theme = json.theme || 'dark';
|
|
|
|
|
+ let themeConfig = json.themeConfig || {};
|
|
|
me.setState({
|
|
me.setState({
|
|
|
theme: theme,
|
|
theme: theme,
|
|
|
- themeConfig: getThemeConfig(theme),
|
|
|
|
|
|
|
+ themeConfig: getThemeConfig(theme, themeConfig),
|
|
|
});
|
|
});
|
|
|
return json;
|
|
return json;
|
|
|
}).then((json) => {
|
|
}).then((json) => {
|
|
@@ -132,8 +133,8 @@ class Factory extends React.Component {
|
|
|
let { code, index } = this.props;
|
|
let { code, index } = this.props;
|
|
|
if(this.dev == 'local') {
|
|
if(this.dev == 'local') {
|
|
|
this.setState({
|
|
this.setState({
|
|
|
- theme: this.theme,
|
|
|
|
|
- themeConfig: getThemeConfig(this.theme),
|
|
|
|
|
|
|
+ theme: tempdata.theme || 'dark',
|
|
|
|
|
+ themeConfig: getThemeConfig(tempdata.theme, tempdata.themeConfig),
|
|
|
model: converter(tempdata.data[0]),
|
|
model: converter(tempdata.data[0]),
|
|
|
});
|
|
});
|
|
|
this.refreshNext = setInterval(function () {
|
|
this.refreshNext = setInterval(function () {
|