From 5d5aaf5618860f0c9bc48763464cf74a7ab0b193 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 19 Jun 2018 09:14:41 +0200 Subject: this header omg... stub in pix2pixhd results view --- .../modules/pix2pixhd/views/pix2pixhd.results.js | 70 ++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 app/client/modules/pix2pixhd/views/pix2pixhd.results.js (limited to 'app/client/modules/pix2pixhd/views') 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 + // 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 ( + //
+ //

{folder.name}

+ // { + // e.preventDefault() + // e.stopPropagation() + // console.log('picked a file', file) + // this.handlePick(file) + // }} + // /> + //
+ // ) + + return ( +
+
+

Pix2PixHD Results

+
+
+ {renders} +
+
+ ) + } + 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) -- cgit v1.2.3-70-g09d2