diff options
Diffstat (limited to 'app/client')
| -rw-r--r-- | app/client/common/paramGroup.component.js | 3 | ||||
| -rw-r--r-- | app/client/modules/pix2pixhd/views/pix2pixhd.live.js | 53 | ||||
| -rw-r--r-- | app/client/socket/socket.task.js | 1 |
3 files changed, 33 insertions, 24 deletions
diff --git a/app/client/common/paramGroup.component.js b/app/client/common/paramGroup.component.js index 1fb875c..7b47c78 100644 --- a/app/client/common/paramGroup.component.js +++ b/app/client/common/paramGroup.component.js @@ -17,7 +17,8 @@ class ParamGroup extends Component { render() { const checked = this.props.opt[this.props.name] const toggle = !this.props.noToggle - const className = (!toggle || checked) ? 'paramGroup active' : 'paramGroup inactive' + const dim = !this.props.noDim + const className = (!dim || !toggle || checked) ? 'paramGroup active' : 'paramGroup inactive' return ( <div className={className}> <label> diff --git a/app/client/modules/pix2pixhd/views/pix2pixhd.live.js b/app/client/modules/pix2pixhd/views/pix2pixhd.live.js index 22dc8e3..a6da1ec 100644 --- a/app/client/modules/pix2pixhd/views/pix2pixhd.live.js +++ b/app/client/modules/pix2pixhd/views/pix2pixhd.live.js @@ -127,29 +127,6 @@ class Pix2PixHDLive extends Component { /> {this.renderRestartButton()} {this.renderRecordButton()} - <Button - title={'Save frame'} - onClick={saveFrame} - > - Save - </Button> - <ParamGroup - title='Record video' - name='store_b' - onToggle={(value) => { - // now storing frames on server... - }} - > - <TextInput - title='Video name' - name='final_tag' - value={this.props.opt.final_tag} - onSave={value => { - this.props.actions.live.set_param('final_tag', value) - }} - /> - </ParamGroup> - <p class='last_message'>{this.props.last_message}</p> </ParamGroup> </div> @@ -304,6 +281,7 @@ class Pix2PixHDLive extends Component { title={'GPU Busy'} onClick={() => this.interrupt()} >Interrupt</Button> + {this.renderLiveButtons()} </div> ) } @@ -324,6 +302,35 @@ class Pix2PixHDLive extends Component { // </Button> // ) } + renderLiveButtons(){ + return ( + <div> + <Button + title={'Save frame'} + onClick={saveFrame} + > + Save + </Button> + <ParamGroup + title='Record video' + name='store_b' + noDim + onToggle={(value) => { + // now storing frames on server... + }} + > + <TextInput + title='Video name' + name='final_tag' + value={this.props.opt.final_tag} + onSave={value => { + this.props.actions.live.set_param('final_tag', value) + }} + /> + </ParamGroup> + </div> + ) + } } function timeInSeconds(n){ return n.toFixed(1) + ' s.' diff --git a/app/client/socket/socket.task.js b/app/client/socket/socket.task.js index bbaa9bd..77f1310 100644 --- a/app/client/socket/socket.task.js +++ b/app/client/socket/socket.task.js @@ -54,6 +54,7 @@ socket.on('task_res', (data) => { case 'task_error': return console.log('task error', data) default: + console.log(data) return console.log('no such task command', data.type) } }) |
