diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-08-13 10:27:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-13 10:27:53 -0700 |
commit | b39c6e08832cecedc95047b00280c2240461f83b (patch) | |
tree | d6230b65e9f487568f0714bc940af2f13183a39c /web/src/js/components/ContentView/ContentViewOptions.jsx | |
parent | 9da55e20477f10155fb79ba66fdc21cca760e40d (diff) | |
parent | 8b43972b95f002e8a5d8a85b7a53f43f16711362 (diff) | |
download | mitmproxy-b39c6e08832cecedc95047b00280c2240461f83b.tar.gz mitmproxy-b39c6e08832cecedc95047b00280c2240461f83b.tar.bz2 mitmproxy-b39c6e08832cecedc95047b00280c2240461f83b.zip |
Merge pull request #1441 from mitmproxy/integrate_mitmproxy_contentviews
Integrate mitmproxy contentviews
Diffstat (limited to 'web/src/js/components/ContentView/ContentViewOptions.jsx')
-rw-r--r-- | web/src/js/components/ContentView/ContentViewOptions.jsx | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/web/src/js/components/ContentView/ContentViewOptions.jsx b/web/src/js/components/ContentView/ContentViewOptions.jsx new file mode 100644 index 00000000..fed3a088 --- /dev/null +++ b/web/src/js/components/ContentView/ContentViewOptions.jsx @@ -0,0 +1,31 @@ +import React, { PropTypes } from 'react' +import { connect } from 'react-redux' +import ViewSelector from './ViewSelector' +import UploadContentButton from './UploadContentButton' +import DownloadContentButton from './DownloadContentButton' + +ContentViewOptions.propTypes = { + flow: React.PropTypes.object.isRequired, + message: React.PropTypes.object.isRequired, +} + +function ContentViewOptions(props) { + const { flow, message, uploadContent, readonly, contentViewDescription } = props + return ( + <div className="view-options"> + <ViewSelector message={message}/> + + <DownloadContentButton flow={flow} message={message}/> + + <UploadContentButton uploadContent={uploadContent}/> + + <span>{contentViewDescription}</span> + </div> + ) +} + +export default connect( + state => ({ + contentViewDescription: state.ui.flow.viewDescription + }) +)(ContentViewOptions) |