mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +00:00
Merge pull request #1278 from mitmproxy/add_accept_revert_buttons_to_menu_flow
added accept and revert to flowmenu
This commit is contained in:
commit
b1715b4092
@ -15,9 +15,11 @@ function FlowMenu({ flow }) {
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className="menu-row">
|
<div className="menu-row">
|
||||||
<Button disabled title="[r]eplay flow" text="Replay" icon="fa-repeat" onClick={FlowActions.replay.bind(null, flow)} />
|
<Button disabled={!flow.intercepted} title="[a]ccept intercepted flow" text="Accept" icon="fa-play" onClick={() => FlowActions.accept(flow)} />
|
||||||
|
<Button title="[r]eplay flow" text="Replay" icon="fa-repeat" onClick={FlowActions.replay.bind(null, flow)} />
|
||||||
<Button title="[D]uplicate flow" text="Duplicate" icon="fa-copy" onClick={FlowActions.duplicate.bind(null, flow)} />
|
<Button title="[D]uplicate flow" text="Duplicate" icon="fa-copy" onClick={FlowActions.duplicate.bind(null, flow)} />
|
||||||
<Button title="[d]elete flow" text="Delete" icon="fa-trash" onClick={FlowActions.delete.bind(null, flow)}/>
|
<Button title="[d]elete flow" text="Delete" icon="fa-trash" onClick={FlowActions.delete.bind(null, flow)}/>
|
||||||
|
<Button disabled={!flow.modified} title="revert changes to flow [V]" text="Revert" icon="fa-history" onClick={() => FlowActions.revert(flow)} />
|
||||||
<Button title="download" text="Download" icon="fa-download" onClick={() => window.location = MessageUtils.getContentURL(flow, flow.response)}/>
|
<Button title="download" text="Download" icon="fa-download" onClick={() => window.location = MessageUtils.getContentURL(flow, flow.response)}/>
|
||||||
</div>
|
</div>
|
||||||
<div className="clearfix"/>
|
<div className="clearfix"/>
|
||||||
|
@ -5,9 +5,11 @@ Button.propTypes = {
|
|||||||
text: PropTypes.string.isRequired
|
text: PropTypes.string.isRequired
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Button({ onClick, text, icon }) {
|
export default function Button({ onClick, text, icon, disabled }) {
|
||||||
return (
|
return (
|
||||||
<div className={"btn btn-default"} onClick={onClick}>
|
<div className={"btn btn-default"}
|
||||||
|
onClick={onClick}
|
||||||
|
disabled={disabled}>
|
||||||
<i className={"fa fa-fw " + icon}/>
|
<i className={"fa fa-fw " + icon}/>
|
||||||
|
|
||||||
{text}
|
{text}
|
||||||
|
Loading…
Reference in New Issue
Block a user