diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-05-29 04:05:11 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-05-29 04:05:11 +0200 |
| commit | 953027ccdfb34c83a6d301401ccb47ec43b86825 (patch) | |
| tree | 4d8adef283de22e7c41ec3abe5805d0d06130ce8 /app/client/dashboard | |
| parent | 59d22800576541b46a3004086835f8cc304927f5 (diff) | |
file list
Diffstat (limited to 'app/client/dashboard')
| -rw-r--r-- | app/client/dashboard/dashboard.component.js | 4 | ||||
| -rw-r--r-- | app/client/dashboard/filelist.component.js | 46 | ||||
| -rw-r--r-- | app/client/dashboard/gallery.component.js | 32 |
3 files changed, 2 insertions, 80 deletions
diff --git a/app/client/dashboard/dashboard.component.js b/app/client/dashboard/dashboard.component.js index 3d3d168..2feba32 100644 --- a/app/client/dashboard/dashboard.component.js +++ b/app/client/dashboard/dashboard.component.js @@ -10,8 +10,8 @@ import Button from '../common/button.component' import DashboardHeader from './dashboardheader.component' import TaskList from './tasklist.component' -import FileList from './filelist.component' -import Gallery from './gallery.component' +import FileList from '../common/fileList.component' +import Gallery from '../common/gallery.component' import * as dashboardActions from './dashboard.actions' diff --git a/app/client/dashboard/filelist.component.js b/app/client/dashboard/filelist.component.js deleted file mode 100644 index 2833ec8..0000000 --- a/app/client/dashboard/filelist.component.js +++ /dev/null @@ -1,46 +0,0 @@ -import { h, Component } from 'preact' -import { bindActionCreators } from 'redux' -import { connect } from 'react-redux' -import * as util from '../util' - -class FileList extends Component { - constructor(props){ - super() - } - render(){ - const { files } = this.props - let time = 0 - const fileList = files.map(file => { - const eta = (time + (file.epochs) * 180 / 60) + " min." - time += (file.epochs) * 180 / 60 - let dataset_type, dataset_name - if (file.dataset.indexOf('/') !== -1) { - [dataset_type, dataset_name] = file.dataset.split('/') - } else { - dataset_name = file.dataset - } - return ( - <div class='row'> - <div class='activity'>{file.activity} {file.library} {dataset_type}</div> - <div class='dataset'>{dataset_name}</div> - <div class='epochs'>{file.epochs} ep.</div> - <div class='eta'>{eta}</div> - </div> - ) - }) - return ( - <div class='filelist rows'> - {fileList} - </div> - ) - } -} - -const mapStateToProps = state => ({ -}) - -const mapDispatchToProps = (dispatch, ownProps) => ({ - // actions: bindActionCreators(liveActions, dispatch) -}) - -export default connect(mapStateToProps, mapDispatchToProps)(FileList) diff --git a/app/client/dashboard/gallery.component.js b/app/client/dashboard/gallery.component.js deleted file mode 100644 index 8db7032..0000000 --- a/app/client/dashboard/gallery.component.js +++ /dev/null @@ -1,32 +0,0 @@ -import { h, Component } from 'preact' -import { bindActionCreators } from 'redux' -import { connect } from 'react-redux' - -class Gallery extends Component { - constructor(props){ - super() - } - render(){ - const { title, images } = this.props - const imageList = images.map(image => { - return ( - <div> - <img src={image.url} /> - </div> - ) - }) - return ( - <div class='gallery'> - {imageList} - </div> - ) - } -} -const mapStateToProps = state => ({ -}) - -const mapDispatchToProps = (dispatch, ownProps) => ({ - // actions: bindActionCreators(liveActions, dispatch) -}) - -export default connect(mapStateToProps, mapDispatchToProps)(Gallery) |
