diff options
Diffstat (limited to 'app/client/common/views')
| -rw-r--r-- | app/client/common/views/index.js | 3 | ||||
| -rw-r--r-- | app/client/common/views/new.view.js | 35 |
2 files changed, 38 insertions, 0 deletions
diff --git a/app/client/common/views/index.js b/app/client/common/views/index.js new file mode 100644 index 0000000..e7f7386 --- /dev/null +++ b/app/client/common/views/index.js @@ -0,0 +1,3 @@ +import NewView from './new.view.js' + +export const New = NewView diff --git a/app/client/common/views/new.view.js b/app/client/common/views/new.view.js new file mode 100644 index 0000000..93ac3d5 --- /dev/null +++ b/app/client/common/views/new.view.js @@ -0,0 +1,35 @@ +import { h, Component } from 'preact' +import { bindActionCreators } from 'redux' +import { connect } from 'react-redux' +import { Link } from 'react-router-dom' +import util from '../../util' + +import Group from '../group.component' +import Param from '../param.component' +import Loading from '../loading.component' +import FolderList from '../folderList.component' + +import NewDatasetForm from '../../dataset/dataset.new' + +export default class NewView extends Component { + constructor(props){ + super(props) + console.log(props) + if (! props.db.data) { + props.actions.load_directories() + } + } + render(){ + const { module, history, db, path } = this.props + return ( + <div class={'app ' + module.name}> + <h1> {module.displayName || module.name}</h1> + <br/> + <div class='col narrow'> + <NewDatasetForm module={module} history={history} /> + <FolderList db={db} path={path} emptyText={<i>No projects yet. Please create one~</i>} /> + </div> + </div> + ) + } +} |
