|
|
|
@ -20,6 +20,7 @@ class Settings extends React.PureComponent {
|
|
|
|
|
}
|
|
|
|
|
this.toggle = this.toggle.bind(this)
|
|
|
|
|
this.format = this.format.bind(this)
|
|
|
|
|
this.handleInputChange = this.handleInputChange.bind(this)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
toggle() {
|
|
|
|
@ -30,6 +31,10 @@ class Settings extends React.PureComponent {
|
|
|
|
|
this.setState({ isVisible: false })
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
handleInputChange(e) {
|
|
|
|
|
this.props.onChange(e.target.name, e.target.value)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
format() {
|
|
|
|
|
return formatCode(this.props.code)
|
|
|
|
|
.then(this.props.onChange.bind(this, 'code'))
|
|
|
|
@ -53,6 +58,13 @@ class Settings extends React.PureComponent {
|
|
|
|
|
selected={this.props.windowTheme || 'none'}
|
|
|
|
|
onChange={this.props.onChange.bind(null, 'windowTheme')}
|
|
|
|
|
/>
|
|
|
|
|
<input
|
|
|
|
|
title="filename"
|
|
|
|
|
placeholder="File name..."
|
|
|
|
|
value={this.props.filename}
|
|
|
|
|
name="filename"
|
|
|
|
|
onChange={this.handleInputChange}
|
|
|
|
|
/>
|
|
|
|
|
<FontSelect
|
|
|
|
|
selected={this.props.fontFamily || 'Hack'}
|
|
|
|
|
onChange={this.props.onChange.bind(null, 'fontFamily')}
|
|
|
|
@ -203,6 +215,17 @@ class Settings extends React.PureComponent {
|
|
|
|
|
.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>
|
|
|
|
|
</div>
|
|
|
|
|