From 2664eb3e474f5d03d1782c15673b774d68fb2c58 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 28 May 2018 13:06:54 +0200 Subject: textInput/fileUpload --- app/client/common/header.component.js | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'app/client/common/header.component.js') diff --git a/app/client/common/header.component.js b/app/client/common/header.component.js index 29c3713..5c1c145 100644 --- a/app/client/common/header.component.js +++ b/app/client/common/header.component.js @@ -1,36 +1,41 @@ import { h, Component } from 'preact' +import { bindActionCreators } from 'redux' import { Link } from 'react-router-dom'; import { connect } from 'react-redux' -function Header(props) { - const tools = "pix2pix samplernn style_transfer_video style_transfer_audio".split(" ").map((s,i) => { - return +import * as systemActions from '../system/system.actions' + +import modules from '../modules' + +function Header({ fps, app, actions }) { + const tool_list = Object.keys(modules).map((name, i) => { + const label = name.replace(/_/, " ") + return }) + const Links = modules[app.tool].links return (
live cortex - actions.changeTool(e.target.value)} value={app.tool}> + {tool_list} system dashboard - checkpoints - datasets - results - live - {props.fps} fps + + {fps} fps
) } const mapStateToProps = state => ({ + app: state.system.app, fps: state.live.fps, - frame: state.live.frame, }) const mapDispatchToProps = (dispatch, ownProps) => ({ + actions: bindActionCreators(systemActions, dispatch), }) export default connect(mapStateToProps, mapDispatchToProps)(Header) -- cgit v1.2.3-70-g09d2