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 --- app/client/common/views/new.view.js | 7 ++- app/client/modules/pix2pixhd/index.js | 3 + .../modules/pix2pixhd/views/pix2pixhd.results.js | 70 ++++++++++++++++++++++ .../modules/samplernn/views/samplernn.results.js | 1 - 4 files changed, 77 insertions(+), 4 deletions(-) create mode 100644 app/client/modules/pix2pixhd/views/pix2pixhd.results.js (limited to 'app') diff --git a/app/client/common/views/new.view.js b/app/client/common/views/new.view.js index 93ac3d5..3b2ffa8 100644 --- a/app/client/common/views/new.view.js +++ b/app/client/common/views/new.view.js @@ -22,9 +22,10 @@ export default class NewView extends Component { render(){ const { module, history, db, path } = this.props return ( -
-

 {module.displayName || module.name}

-
+
+
+

{module.displayName || module.name}

+
No projects yet. Please create one~} /> 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 { + ) @@ -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 + // 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) diff --git a/app/client/modules/samplernn/views/samplernn.results.js b/app/client/modules/samplernn/views/samplernn.results.js index 8212efe..75121aa 100644 --- a/app/client/modules/samplernn/views/samplernn.results.js +++ b/app/client/modules/samplernn/views/samplernn.results.js @@ -58,7 +58,6 @@ class SampleRNNResults extends Component {

SampleRNN Results

- new project
{renders} -- cgit v1.2.3-70-g09d2