|
|
@ -20,6 +20,7 @@ class Settings extends React.PureComponent {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.toggle = this.toggle.bind(this)
|
|
|
|
this.toggle = this.toggle.bind(this)
|
|
|
|
this.format = this.format.bind(this)
|
|
|
|
this.format = this.format.bind(this)
|
|
|
|
|
|
|
|
this.handleInputChange = this.handleInputChange.bind(this)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
toggle() {
|
|
|
|
toggle() {
|
|
|
@ -30,6 +31,10 @@ class Settings extends React.PureComponent {
|
|
|
|
this.setState({ isVisible: false })
|
|
|
|
this.setState({ isVisible: false })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
handleInputChange(e) {
|
|
|
|
|
|
|
|
this.props.onChange(e.target.name, e.target.value)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
format() {
|
|
|
|
format() {
|
|
|
|
return formatCode(this.props.code)
|
|
|
|
return formatCode(this.props.code)
|
|
|
|
.then(this.props.onChange.bind(this, 'code'))
|
|
|
|
.then(this.props.onChange.bind(this, 'code'))
|
|
|
@ -53,6 +58,13 @@ class Settings extends React.PureComponent {
|
|
|
|
selected={this.props.windowTheme || 'none'}
|
|
|
|
selected={this.props.windowTheme || 'none'}
|
|
|
|
onChange={this.props.onChange.bind(null, 'windowTheme')}
|
|
|
|
onChange={this.props.onChange.bind(null, 'windowTheme')}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
<input
|
|
|
|
|
|
|
|
title="filename"
|
|
|
|
|
|
|
|
placeholder="File name..."
|
|
|
|
|
|
|
|
value={this.props.filename}
|
|
|
|
|
|
|
|
name="filename"
|
|
|
|
|
|
|
|
onChange={this.handleInputChange}
|
|
|
|
|
|
|
|
/>
|
|
|
|
<FontSelect
|
|
|
|
<FontSelect
|
|
|
|
selected={this.props.fontFamily || 'Hack'}
|
|
|
|
selected={this.props.fontFamily || 'Hack'}
|
|
|
|
onChange={this.props.onChange.bind(null, 'fontFamily')}
|
|
|
|
onChange={this.props.onChange.bind(null, 'fontFamily')}
|
|
|
@ -203,6 +215,17 @@ class Settings extends React.PureComponent {
|
|
|
|
.red {
|
|
|
|
.red {
|
|
|
|
color: red;
|
|
|
|
color: red;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
input {
|
|
|
|
|
|
|
|
padding: 8px;
|
|
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
|
|
color: ${COLORS.SECONDARY};
|
|
|
|
|
|
|
|
background: ${COLORS.BLACK};
|
|
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
|
|
border-bottom: solid 1px ${COLORS.SECONDARY};
|
|
|
|
|
|
|
|
outline: none;
|
|
|
|
|
|
|
|
}
|
|
|
|
`}
|
|
|
|
`}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|