diff options
author | Maximilian Hils <git@maximilianhils.com> | 2015-03-22 15:29:55 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2015-03-22 15:29:55 +0100 |
commit | 2acd77dea025b489d5d0ca19fc1c84901ac335d4 (patch) | |
tree | 9f56e707720c1ca684a128c46c7537e7178846e6 /libmproxy/web/static | |
parent | 39a8ac7e2a405b84edc55289cb8bdfb2ac1948fa (diff) | |
download | mitmproxy-2acd77dea025b489d5d0ca19fc1c84901ac335d4.tar.gz mitmproxy-2acd77dea025b489d5d0ca19fc1c84901ac335d4.tar.bz2 mitmproxy-2acd77dea025b489d5d0ca19fc1c84901ac335d4.zip |
web: add content download
Diffstat (limited to 'libmproxy/web/static')
-rw-r--r-- | libmproxy/web/static/app.css | 2 | ||||
-rw-r--r-- | libmproxy/web/static/app.js | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/libmproxy/web/static/app.css b/libmproxy/web/static/app.css index ccaefe92..d767ac76 100644 --- a/libmproxy/web/static/app.css +++ b/libmproxy/web/static/app.css @@ -294,7 +294,7 @@ header .menu { .flow-detail hr { margin: 0 0 5px; } -.view-selector { +.view-options { margin-top: 10px; } .flow-detail table { diff --git a/libmproxy/web/static/app.js b/libmproxy/web/static/app.js index 84681403..83bb99ab 100644 --- a/libmproxy/web/static/app.js +++ b/libmproxy/web/static/app.js @@ -1416,10 +1416,14 @@ var ContentView = React.createClass({displayName: "ContentView", return React.createElement(TooLarge, React.__spread({}, this.props, {onClick: this.displayLarge})); } + var downloadUrl = MessageUtils.getContentURL(this.props.flow, message); + return React.createElement("div", null, React.createElement(this.state.View, React.__spread({}, this.props)), - React.createElement("div", {className: "text-center"}, - React.createElement(ViewSelector, {selectView: this.selectView, active: this.state.View, message: message}) + React.createElement("div", {className: "view-options text-center"}, + React.createElement(ViewSelector, {selectView: this.selectView, active: this.state.View, message: message}), + " ", + React.createElement("a", {className: "btn btn-default btn-xs", href: downloadUrl}, React.createElement("i", {className: "fa fa-download"})) ) ); } |