summaryrefslogtreecommitdiff
path: root/app/client/modules/pix2pixhd
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-06-19 09:14:41 +0200
committerJules Laplace <julescarbon@gmail.com>2018-06-19 09:14:41 +0200
commit5d5aaf5618860f0c9bc48763464cf74a7ab0b193 (patch)
treef7dcbe8c364e90ef23b7c545d7801875694d6abe /app/client/modules/pix2pixhd
parentda016de8db8c4e73d606526caa0b9a7e1c68c754 (diff)
this header omg... stub in pix2pixhd results view
Diffstat (limited to 'app/client/modules/pix2pixhd')
-rw-r--r--app/client/modules/pix2pixhd/index.js3
-rw-r--r--app/client/modules/pix2pixhd/views/pix2pixhd.results.js70
2 files changed, 73 insertions, 0 deletions
diff --git a/app/client/modules/pix2pixhd/index.js b/app/client/modules/pix2pixhd/index.js
index 75c4d7f..ea224f3 100644
--- a/app/client/modules/pix2pixhd/index.js
+++ b/app/client/modules/pix2pixhd/index.js
@@ -7,6 +7,7 @@ import util from '../../util'
import Pix2PixHDNew from './views/pix2pixhd.new'
import Pix2PixHDShow from './views/pix2pixhd.show'
+import Pix2PixHDResults from './views/pix2pixhd.results'
import Pix2PixHDLive from './views/pix2pixhd.live'
class router {
@@ -24,6 +25,7 @@ class router {
<Route exact path='/pix2pixhd/new/' component={Pix2PixHDNew} />
<Route exact path='/pix2pixhd/sequences/' component={Pix2PixHDShow} />
<Route exact path='/pix2pixhd/sequences/:id/' component={Pix2PixHDShow} />
+ <Route exact path='/pix2pixhd/results/' component={Pix2PixHDResults} />
<Route exact path='/pix2pixhd/live/' component={Pix2PixHDLive} />
</section>
)
@@ -34,6 +36,7 @@ function links(){
return [
{ url: '/pix2pixhd/new/', name: 'new' },
{ url: '/pix2pixhd/sequences/', name: 'sequences' },
+ { url: '/pix2pixhd/results/', name: 'results' },
{ url: '/pix2pixhd/live/', name: 'live' },
]
}
diff --git a/app/client/modules/pix2pixhd/views/pix2pixhd.results.js b/app/client/modules/pix2pixhd/views/pix2pixhd.results.js
new file mode 100644
index 0000000..45caa84
--- /dev/null
+++ b/app/client/modules/pix2pixhd/views/pix2pixhd.results.js
@@ -0,0 +1,70 @@
+import { h, Component } from 'preact'
+import { bindActionCreators } from 'redux'
+import { Link } from 'react-router-dom';
+import { connect } from 'react-redux'
+import util from '../../../util'
+
+import * as pix2pixhdActions from '../pix2pixhd.actions'
+import * as pix2pixhdTasks from '../pix2pixhd.tasks'
+
+import Loading from '../../../common/loading.component'
+import { FileList, FileRow } from '../../../common/fileList.component'
+
+class Pix2pixHDResults extends Component {
+ constructor(props){
+ super()
+ // if (!props.pix2pixhd.data) props.actions.load_directories()
+ }
+ render(){
+ if (this.props.pix2pixhd.loading) return <Loading progress={this.props.pix2pixhd.progress} />
+ // const { folderLookup, fileLookup, datasetLookup } = this.props.samplernn.data
+
+ // console.log(bestRenders.map(r => r.epoch))
+ // const path = folder.name === 'unsorted'
+ // ? "/samplernn/import/"
+ // : "/samplernn/datasets/" + folder.id + "/"
+ // return (
+ // <div className='col bestRenders'>
+ // <h3><Link to={path}>{folder.name}</Link></h3>
+ // <FileList
+ // linkFiles
+ // files={bestRenders}
+ // orderBy='date desc'
+ // fields={'name date epoch size'}
+ // onClick={(file, e) => {
+ // e.preventDefault()
+ // e.stopPropagation()
+ // console.log('picked a file', file)
+ // this.handlePick(file)
+ // }}
+ // />
+ // </div>
+ // )
+
+ return (
+ <div className='app pix2pixhd'>
+ <div className='heading row middle'>
+ <h1>Pix2PixHD Results</h1>
+ </div>
+ <div class='rows params renders'>
+ {renders}
+ </div>
+ </div>
+ )
+ }
+ handlePick(file){
+ // this.props.audioPlayer.play(file)
+ }
+}
+
+const mapStateToProps = state => ({
+ pix2pixhd: state.module.pix2pixhd,
+})
+
+const mapDispatchToProps = (dispatch, ownProps) => ({
+ actions: bindActionCreators(pix2pixhdActions, dispatch),
+ remote: bindActionCreators(pix2pixhdTasks, dispatch),
+ // audioPlayer: bindActionCreators(audioPlayerActions, dispatch),
+})
+
+export default connect(mapStateToProps, mapDispatchToProps)(Pix2pixHDResults)