diff options
author | Matthew Shao <me@matshao.com> | 2017-06-28 18:49:11 +0800 |
---|---|---|
committer | Matthew Shao <me@matshao.com> | 2017-06-28 18:49:11 +0800 |
commit | 2a9b2a549ab3ca012f98b7a069ca14442ee6a1e8 (patch) | |
tree | 719fbc4aa7a15be9464d93c82a073d07e6844b79 | |
parent | c0ad25715bc050dac0134ccd46f25884396d0f87 (diff) | |
download | mitmproxy-2a9b2a549ab3ca012f98b7a069ca14442ee6a1e8.tar.gz mitmproxy-2a9b2a549ab3ca012f98b7a069ca14442ee6a1e8.tar.bz2 mitmproxy-2a9b2a549ab3ca012f98b7a069ca14442ee6a1e8.zip |
[web] Add Option Modal to FileMenu.
-rw-r--r-- | web/src/js/components/Header/FileMenu.jsx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/web/src/js/components/Header/FileMenu.jsx b/web/src/js/components/Header/FileMenu.jsx index 70fbb2c3..82855c43 100644 --- a/web/src/js/components/Header/FileMenu.jsx +++ b/web/src/js/components/Header/FileMenu.jsx @@ -4,11 +4,13 @@ import { connect } from 'react-redux' import FileChooser from '../common/FileChooser' import Dropdown, {Divider} from '../common/Dropdown' import * as flowsActions from '../../ducks/flows' +import * as modalActions from '../../ducks/ui/modal' FileMenu.propTypes = { clearFlows: PropTypes.func.isRequired, loadFlows: PropTypes.func.isRequired, - saveFlows: PropTypes.func.isRequired + saveFlows: PropTypes.func.isRequired, + openModal: PropTypes.func.isRequired, } FileMenu.onNewClick = (e, clearFlows) => { @@ -17,7 +19,7 @@ FileMenu.onNewClick = (e, clearFlows) => { clearFlows() } -export function FileMenu ({clearFlows, loadFlows, saveFlows}) { +export function FileMenu ({clearFlows, loadFlows, saveFlows, openModal}) { return ( <Dropdown className="pull-left" btnClass="special" text="mitmproxy"> <a href="#" onClick={e => FileMenu.onNewClick(e, clearFlows)}> @@ -34,6 +36,11 @@ export function FileMenu ({clearFlows, loadFlows, saveFlows}) { Save... </a> + <a href="#" onClick={e => { openModal('OptionModal') }}> + <i className="fa fa-fw fa-cog"></i> + Options + </a> + <Divider/> <a href="http://mitm.it/" target="_blank"> @@ -50,5 +57,6 @@ export default connect( clearFlows: flowsActions.clear, loadFlows: flowsActions.upload, saveFlows: flowsActions.download, + openModal: modalActions.setActiveModal, } )(FileMenu) |