summaryrefslogtreecommitdiff
path: root/app/client/modules/pix2pixhd/views/pix2pixhd.results.js
blob: dcbbfad5312b5b5da3d09492dd3578c80c85096d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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'>
        </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)