aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/components/Header/FlowMenu.jsx
diff options
context:
space:
mode:
authorMatthew Shao <me@matshao.com>2017-08-07 11:05:02 +0800
committerMatthew Shao <me@matshao.com>2017-08-07 11:05:02 +0800
commitf7b494ccf2a90d8c54df760e5142f34f11f8cf3c (patch)
tree9e70578680357bffc89c2bfb48ae978876d6d222 /web/src/js/components/Header/FlowMenu.jsx
parent94a0b82ceedf1847a9bc67a6338369583f8410f9 (diff)
downloadmitmproxy-f7b494ccf2a90d8c54df760e5142f34f11f8cf3c.tar.gz
mitmproxy-f7b494ccf2a90d8c54df760e5142f34f11f8cf3c.tar.bz2
mitmproxy-f7b494ccf2a90d8c54df760e5142f34f11f8cf3c.zip
[web] Add HideInStatic Component
HideInStaic compoent will check the MITMWEB_STATIC var, and hide the responsive components in static mode.
Diffstat (limited to 'web/src/js/components/Header/FlowMenu.jsx')
-rw-r--r--web/src/js/components/Header/FlowMenu.jsx11
1 files changed, 7 insertions, 4 deletions
diff --git a/web/src/js/components/Header/FlowMenu.jsx b/web/src/js/components/Header/FlowMenu.jsx
index 8f104213..dc822150 100644
--- a/web/src/js/components/Header/FlowMenu.jsx
+++ b/web/src/js/components/Header/FlowMenu.jsx
@@ -4,6 +4,7 @@ import { connect } from "react-redux"
import Button from "../common/Button"
import { MessageUtils } from "../../flow/utils.js"
import * as flowsActions from "../../ducks/flows"
+import HideInStatic from "../common/HideInStatic";
FlowMenu.title = 'Flow'
@@ -22,7 +23,7 @@ export function FlowMenu({ flow, resumeFlow, killFlow, replayFlow, duplicateFlow
return <div/>
return (
<div>
- <div className="menu-group">
+ <HideInStatic className="menu-group">
<div className="menu-content">
<Button title="[r]eplay flow" icon="fa-repeat text-primary"
onClick={() => replayFlow(flow)}>
@@ -42,7 +43,8 @@ export function FlowMenu({ flow, resumeFlow, killFlow, replayFlow, duplicateFlow
</Button>
</div>
<div className="menu-legend">Flow Modification</div>
- </div>
+ </HideInStatic>
+
<div className="menu-group">
<div className="menu-content">
<Button title="download" icon="fa-download"
@@ -52,7 +54,8 @@ export function FlowMenu({ flow, resumeFlow, killFlow, replayFlow, duplicateFlow
</div>
<div className="menu-legend">Export</div>
</div>
- <div className="menu-group">
+
+ <HideInStatic className="menu-group">
<div className="menu-content">
<Button disabled={!flow || !flow.intercepted} title="[a]ccept intercepted flow"
icon="fa-play text-success" onClick={() => resumeFlow(flow)}>
@@ -64,7 +67,7 @@ export function FlowMenu({ flow, resumeFlow, killFlow, replayFlow, duplicateFlow
</Button>
</div>
<div className="menu-legend">Interception</div>
- </div>
+ </HideInStatic>
</div>