|
|
@ -22,6 +22,7 @@ import {
|
|
|
|
LANGUAGE_MIME_HASH,
|
|
|
|
LANGUAGE_MIME_HASH,
|
|
|
|
LANGUAGE_MODE_HASH,
|
|
|
|
LANGUAGE_MODE_HASH,
|
|
|
|
DEFAULT_LANGUAGE,
|
|
|
|
DEFAULT_LANGUAGE,
|
|
|
|
|
|
|
|
DEFAULT_THEME,
|
|
|
|
COLORS,
|
|
|
|
COLORS,
|
|
|
|
DEFAULT_CODE
|
|
|
|
DEFAULT_CODE
|
|
|
|
} from '../lib/constants'
|
|
|
|
} from '../lib/constants'
|
|
|
@ -55,7 +56,7 @@ class Editor extends React.Component {
|
|
|
|
this.state = Object.assign(
|
|
|
|
this.state = Object.assign(
|
|
|
|
{
|
|
|
|
{
|
|
|
|
background: 'rgba(171, 184, 195, 1)',
|
|
|
|
background: 'rgba(171, 184, 195, 1)',
|
|
|
|
theme: THEMES_HASH.seti.id,
|
|
|
|
theme: DEFAULT_THEME.id,
|
|
|
|
language: DEFAULT_LANGUAGE,
|
|
|
|
language: DEFAULT_LANGUAGE,
|
|
|
|
dropShadow: true,
|
|
|
|
dropShadow: true,
|
|
|
|
windowControls: true,
|
|
|
|
windowControls: true,
|
|
|
@ -140,8 +141,8 @@ class Editor extends React.Component {
|
|
|
|
<div id="editor">
|
|
|
|
<div id="editor">
|
|
|
|
<Toolbar>
|
|
|
|
<Toolbar>
|
|
|
|
<Dropdown
|
|
|
|
<Dropdown
|
|
|
|
selected={THEMES_HASH[this.state.theme]}
|
|
|
|
selected={THEMES_HASH[this.state.theme] || DEFAULT_THEME}
|
|
|
|
list={THEMES.filter(t => t.name)}
|
|
|
|
list={THEMES}
|
|
|
|
onChange={theme => this.setState({ theme: theme.id })}
|
|
|
|
onChange={theme => this.setState({ theme: theme.id })}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<Dropdown
|
|
|
|
<Dropdown
|
|
|
|