diff --git a/libmproxy/web/static/app.css b/libmproxy/web/static/app.css index ccaefe92b..d767ac769 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 846814033..83bb99abb 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"})) ) ); } diff --git a/web/src/css/flowdetail.less b/web/src/css/flowdetail.less index 9feb72452..cc67eeb28 100644 --- a/web/src/css/flowdetail.less +++ b/web/src/css/flowdetail.less @@ -34,7 +34,7 @@ } -.view-selector { +.view-options { margin-top: 10px; } diff --git a/web/src/js/components/flowview/contentview.js b/web/src/js/components/flowview/contentview.js index e4d119971..828c6d087 100644 --- a/web/src/js/components/flowview/contentview.js +++ b/web/src/js/components/flowview/contentview.js @@ -219,10 +219,14 @@ var ContentView = React.createClass({ return ; } + var downloadUrl = MessageUtils.getContentURL(this.props.flow, message); + return
-
+
+   +
; }