summaryrefslogtreecommitdiff
path: root/app/client/modules/pix2pixhd/views/sequence.editor.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/client/modules/pix2pixhd/views/sequence.editor.js')
-rw-r--r--app/client/modules/pix2pixhd/views/sequence.editor.js29
1 files changed, 16 insertions, 13 deletions
diff --git a/app/client/modules/pix2pixhd/views/sequence.editor.js b/app/client/modules/pix2pixhd/views/sequence.editor.js
index 9693805..a749df9 100644
--- a/app/client/modules/pix2pixhd/views/sequence.editor.js
+++ b/app/client/modules/pix2pixhd/views/sequence.editor.js
@@ -3,9 +3,9 @@ import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'
import { Route, Link } from 'react-router-dom'
-import { Loading, FileList, FileViewer } from '../../common'
+import { Loading, FileList, FileViewer } from '../../../common'
-import actions from '../actions'
+import actions from '../../../actions'
class SequenceEditor extends Component {
state = {
@@ -14,7 +14,12 @@ class SequenceEditor extends Component {
loading: true
}
componentDidMount() {
- this.fetch(this.state.dir)
+ this.fetch(this.props.dataset)
+ }
+ componentDidUpdate(prevProps) {
+ if (this.props.dataset !== prevProps.dataset) {
+ this.fetch(this.props.dataset)
+ }
}
handlePick(file) {
console.log(file)
@@ -26,22 +31,13 @@ class SequenceEditor extends Component {
}
fetch(dir) {
console.log('fetch', dir)
- const { tool: module } = this.props.app
+ const { name: module } = this.props.module.name
this.setState({ dir, file: null, loading: true })
actions.socket.list_directory({ module, dir }).then(files => {
console.log(files)
this.setState({ dir, files, loading: false })
})
}
- fetchFile(fn) {
- console.log('fetch file', fn)
- const { tool: module } = this.props.app
- this.setState({ file: null, loadingFile: true })
- actions.socket.read_file({ module, fn }).then(file => {
- console.log(file)
- this.setState({ file, loadingFile: false })
- })
- }
render() {
const { app } = this.props
const {
@@ -49,6 +45,13 @@ class SequenceEditor extends Component {
loadingFile, file,
} = this.state
console.log(this.props, this.state)
+ return (
+ <div className='sequenceEditor'>
+ <div className='timeline'>
+ <div className='selection'></div>
+ </div>
+ </div>
+ )
// return (
// <div className='app browser'>
// <h1>{dir}{dir[dir.length-1] !== '/' && '/'}</h1>