From d1c7b203f08d4b1e1ee3c7a50762a4f08843feef Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sun, 11 Dec 2016 19:59:54 +0100 Subject: [web] style flow menu --- web/src/js/components/Header/FlowMenu.jsx | 62 +++++++++++++++---- web/src/js/components/Header/MenuToggle.jsx | 2 +- web/src/js/components/Header/OptionMenu.jsx | 92 +++++++++++++++-------------- 3 files changed, 100 insertions(+), 56 deletions(-) (limited to 'web/src/js/components/Header') diff --git a/web/src/js/components/Header/FlowMenu.jsx b/web/src/js/components/Header/FlowMenu.jsx index e0c59afe..420cb054 100644 --- a/web/src/js/components/Header/FlowMenu.jsx +++ b/web/src/js/components/Header/FlowMenu.jsx @@ -1,13 +1,13 @@ -import React, { PropTypes } from 'react' -import { connect } from 'react-redux' -import Button from '../common/Button' -import { MessageUtils } from '../../flow/utils.js' -import * as flowsActions from '../../ducks/flows' +import React, { PropTypes } from "react" +import { connect } from "react-redux" +import Button from "../common/Button" +import { MessageUtils } from "../../flow/utils.js" +import * as flowsActions from "../../ducks/flows" FlowMenu.title = 'Flow' FlowMenu.propTypes = { - flow: PropTypes.object.isRequired, + flow: PropTypes.object, acceptFlow: PropTypes.func.isRequired, replayFlow: PropTypes.func.isRequired, duplicateFlow: PropTypes.func.isRequired, @@ -16,14 +16,52 @@ FlowMenu.propTypes = { } function FlowMenu({ flow, acceptFlow, replayFlow, duplicateFlow, removeFlow, revertFlow }) { + if (!flow) + return
return (
- + + + +
+
Flow Modification
+
+
+
+ +
+
Export
+
+
+
+ + +
+
Interception
+
+ + + ) } diff --git a/web/src/js/components/Header/MenuToggle.jsx b/web/src/js/components/Header/MenuToggle.jsx index 726db7bd..8977f3b9 100644 --- a/web/src/js/components/Header/MenuToggle.jsx +++ b/web/src/js/components/Header/MenuToggle.jsx @@ -11,7 +11,7 @@ MenuToggle.propTypes = { export function MenuToggle({ value, onChange, children }) { return ( -
+