diff options
| -rw-r--r-- | app/client/common/views/new.view.js | 7 | ||||
| -rw-r--r-- | app/client/modules/pix2pixhd/index.js | 3 | ||||
| -rw-r--r-- | app/client/modules/pix2pixhd/views/pix2pixhd.results.js | 70 | ||||
| -rw-r--r-- | app/client/modules/samplernn/views/samplernn.results.js | 1 | ||||
| -rw-r--r-- | public/assets/css/css.css | 13 |
5 files changed, 83 insertions, 11 deletions
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 ( - <div class={'app ' + module.name}> - <h1> {module.displayName || module.name}</h1> - <br/> + <div class={'app new-view ' + module.name}> + <div class='heading'> + <h1>{module.displayName || module.name}</h1> + </div> <div class='col narrow'> <NewDatasetForm module={module} history={history} /> <FolderList db={db} path={path} emptyText={<i>No projects yet. Please create one~</i>} /> 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) 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 { <div className='app samplernn'> <div className='heading row middle'> <h1>SampleRNN Results</h1> - <Link to='/samplernn/new/'>new project</Link> </div> <div class='rows params renders'> {renders} diff --git a/public/assets/css/css.css b/public/assets/css/css.css index 8e152ac..0a3b95d 100644 --- a/public/assets/css/css.css +++ b/public/assets/css/css.css @@ -1,4 +1,4 @@ -* { box-sizing: border-box } +* { box-sizing: border-box; } html,body { margin: 0; padding: 0; width: 100%; height: 100%; @@ -16,7 +16,6 @@ header { top: 0px; left: 50%; transform: translateX(-50%); - background: white; padding: 10px; width: 1020px; max-width: calc(100vw - 20px); @@ -107,12 +106,11 @@ section { display: flex; flex-direction: column; align-self: flex-start; - width: 92vw; + width: calc(100vw - 40px); max-width: 1000px; min-height: 100vh; - padding-top: 50px; + padding-top: 30px; padding-bottom: 50px; - overflow: auto; } .app.centered { align-items: center; @@ -345,7 +343,6 @@ section { /* folder list */ .folderList { margin-top: 10px; - margin-left: 7px; } .folderList h3 { margin-bottom: 3px; @@ -554,6 +551,8 @@ section { background: white; padding: 10px; box-shadow: 0 1px 2px rgba(0,0,0,0.2); + position: relative; + left: -10px; } .last_message { width: 250px; @@ -589,7 +588,7 @@ section { font-family: Menlo, monospace; font-size: 12px; line-height: 15px; - overflow: auto; + overflow: scroll; background: rgba(238,238,238,0.4); border: 1px solid #bbb; color: #234; |
