summaryrefslogtreecommitdiff
path: root/app/client
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-06-22 17:04:55 +0200
committerJules Laplace <julescarbon@gmail.com>2018-06-22 17:04:55 +0200
commita3573815ed1f6f2cc1388ae91cc7d07eb9980785 (patch)
treebdd6f5a857f1f4551fa0e41e87da924f424fecc8 /app/client
parent83c9100bdd0887bc18ac5fe786699bc150c37cb9 (diff)
deploy bundle
Diffstat (limited to 'app/client')
-rw-r--r--app/client/common/paramGroup.component.js3
-rw-r--r--app/client/modules/pix2pixhd/views/pix2pixhd.live.js53
-rw-r--r--app/client/socket/socket.task.js1
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)
}
})