summaryrefslogtreecommitdiff
path: root/app/client
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-06-26 01:55:55 +0200
committerJules Laplace <julescarbon@gmail.com>2018-06-26 01:55:55 +0200
commite055ca78a53e0f0b8f4b3a351717a8987d6706eb (patch)
tree1ede1f61d5ba76cfea0da208e4eaac585f76d9ea /app/client
parent8d06839056967e8786c63976545aff098ae2f128 (diff)
params should pass thru..
Diffstat (limited to 'app/client')
-rw-r--r--app/client/common/select.component.js2
-rw-r--r--app/client/modules/morph/morph.actions.js1
-rw-r--r--app/client/modules/morph/morph.tasks.js15
-rw-r--r--app/client/modules/morph/views/morph.app.js15
4 files changed, 17 insertions, 16 deletions
diff --git a/app/client/common/select.component.js b/app/client/common/select.component.js
index d08ae60..c7fa93c 100644
--- a/app/client/common/select.component.js
+++ b/app/client/common/select.component.js
@@ -13,7 +13,7 @@ class Select extends Component {
this.props.onChange && this.props.onChange(this.props.name, new_value)
}
render() {
- const currentValue = this.props.opt[this.props.name]
+ const currentValue = this.props.live ? this.props.opt[this.props.name] : this.props.value
let lastValue
const options = (this.props.options || []).map((key,i) => {
let name, value
diff --git a/app/client/modules/morph/morph.actions.js b/app/client/modules/morph/morph.actions.js
index 9d47d03..04f452d 100644
--- a/app/client/modules/morph/morph.actions.js
+++ b/app/client/modules/morph/morph.actions.js
@@ -36,6 +36,7 @@ export const load_data = (id) => (dispatch) => {
type: types.morph.load,
data: datasetApiReport,
app: {
+ resultsFolder,
files,
sequences,
renders,
diff --git a/app/client/modules/morph/morph.tasks.js b/app/client/modules/morph/morph.tasks.js
index 67abc8a..ad88fc0 100644
--- a/app/client/modules/morph/morph.tasks.js
+++ b/app/client/modules/morph/morph.tasks.js
@@ -7,17 +7,16 @@ import actions from '../../actions'
import module from './morph.module'
-export const fetch_task = (url, file_id, dataset) => dispatch => {
- if (! url) return console.log('input file inaccessible (no url)')
+export const morph_task = (state, folder) => dispatch => {
const task = {
module: module.name,
- activity: 'fetch',
- dataset: dataset,
+ activity: 'morph',
+ dataset: state.a,
+ folder_id: folder.id,
opt: {
- url,
- file_id,
- dataset,
- }
+ ...state,
+ dataset_module: 'pix2pihd',
+ },
}
return actions.queue.add_task(task)
}
diff --git a/app/client/modules/morph/views/morph.app.js b/app/client/modules/morph/views/morph.app.js
index 045f396..38cd121 100644
--- a/app/client/modules/morph/views/morph.app.js
+++ b/app/client/modules/morph/views/morph.app.js
@@ -28,7 +28,7 @@ class MorphResults extends Component {
steps: 16,
dilate: 2,
smooth: true,
- cmd: 'mix',
+ mode: 'mix',
}
if (!props.morph.data) props.actions.load_data()
}
@@ -38,7 +38,7 @@ class MorphResults extends Component {
render(){
if (! this.props.morph.app) return <Loading progress={this.props.morph.progress} />
- const { sequences, renders, files } = this.props.morph.app
+ const { resultsFolder, sequences, renders, files } = this.props.morph.app
const sequence_options = sequences.map(sequence => [
sequence.name.split("_").slice(0, 3).join(" ") + "~ (" + sequence.count + ")",
sequence.name
@@ -92,10 +92,10 @@ class MorphResults extends Component {
<Group title="Morph Settings">
<Select
- title="Action"
- value={this.state.cmd}
+ title={"Mode"}
+ value={this.state.mode}
options={['mix', 'average']}
- onChange={key => this.setState({ a: key })}
+ onChange={key => this.setState({ mode: key })}
/>
<Slider
type="list"
@@ -117,8 +117,9 @@ class MorphResults extends Component {
onToggle={key => this.setState({ smooth: key })}
/>
<Button
- title="Run morph"
- value="Go"
+ title="Run task"
+ value="Morph!"
+ onClick={() => this.props.remote.morph_task(this.state, resultsFolder)}
/>
<br />
<Param title="Total length">