diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-19 09:14:41 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-19 09:14:41 +0200 |
| commit | 5d5aaf5618860f0c9bc48763464cf74a7ab0b193 (patch) | |
| tree | f7dcbe8c364e90ef23b7c545d7801875694d6abe /app/client/modules/pix2pixhd/views | |
| parent | da016de8db8c4e73d606526caa0b9a7e1c68c754 (diff) | |
this header omg... stub in pix2pixhd results view
Diffstat (limited to 'app/client/modules/pix2pixhd/views')
| -rw-r--r-- | app/client/modules/pix2pixhd/views/pix2pixhd.results.js | 70 |
1 files changed, 70 insertions, 0 deletions
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) |
