diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-11-23 01:26:47 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-11-23 01:27:52 +0100 |
commit | dc75605e463f064fce07a1a7bf23b16f66742cbb (patch) | |
tree | 84e9c30d916585b53ab37e5d9bff6befb9ccf61d /web/src/js/components/ContentView/ContentViewOptions.jsx | |
parent | f1662cbfd7e2d6064d8a1fde22b6f3d288766f04 (diff) | |
download | mitmproxy-dc75605e463f064fce07a1a7bf23b16f66742cbb.tar.gz mitmproxy-dc75605e463f064fce07a1a7bf23b16f66742cbb.tar.bz2 mitmproxy-dc75605e463f064fce07a1a7bf23b16f66742cbb.zip |
minor fixes
Diffstat (limited to 'web/src/js/components/ContentView/ContentViewOptions.jsx')
-rw-r--r-- | web/src/js/components/ContentView/ContentViewOptions.jsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/web/src/js/components/ContentView/ContentViewOptions.jsx b/web/src/js/components/ContentView/ContentViewOptions.jsx index fed3a088..6bc66db2 100644 --- a/web/src/js/components/ContentView/ContentViewOptions.jsx +++ b/web/src/js/components/ContentView/ContentViewOptions.jsx @@ -9,15 +9,14 @@ ContentViewOptions.propTypes = { message: React.PropTypes.object.isRequired, } -function ContentViewOptions(props) { - const { flow, message, uploadContent, readonly, contentViewDescription } = props +function ContentViewOptions({ flow, message, uploadContent, readonly, contentViewDescription }) { return ( <div className="view-options"> <ViewSelector message={message}/> <DownloadContentButton flow={flow} message={message}/> - <UploadContentButton uploadContent={uploadContent}/> + {!readonly && <UploadContentButton uploadContent={uploadContent}/> } <span>{contentViewDescription}</span> </div> @@ -26,6 +25,7 @@ function ContentViewOptions(props) { export default connect( state => ({ - contentViewDescription: state.ui.flow.viewDescription + contentViewDescription: state.ui.flow.viewDescription, + readonly: !state.ui.flow.modifiedFlow, }) )(ContentViewOptions) |