Merging command_headers

This commit is contained in:
James Barnsley
2019-08-30 08:37:06 +12:00
8 changed files with 660 additions and 694 deletions

View File

@ -26,7 +26,8 @@ class EditCommand extends React.Component{
colour: '',
url: "https://"+window.location.hostname+"/broadlink/sendCommand/power/",
method: 'GET',
post_data: ""
post_data: "",
additional_headers: ""
}
}
@ -210,6 +211,20 @@ class EditCommand extends React.Component{
</div>
</div>}
<div className="field textarea white">
<div className="name">
Additional Headers
</div>
<div className="input">
<textarea
name="headers"
value={this.state.additional_headers}
onChange={ e => this.setState({ additional_headers: e.target.value })}>
</textarea>
</div>
</div>
<div className="actions centered-text">
{this.props.command ? <button type="button" className="button button--destructive button--large" onClick={e => this.handleDelete(e)}>Delete</button> : null}
<button type="submit" className="button button--primary button--large">Save</button>