mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
web: add content download
This commit is contained in:
parent
39a8ac7e2a
commit
2acd77dea0
@ -294,7 +294,7 @@ header .menu {
|
||||
.flow-detail hr {
|
||||
margin: 0 0 5px;
|
||||
}
|
||||
.view-selector {
|
||||
.view-options {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.flow-detail table {
|
||||
|
@ -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"}))
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -34,7 +34,7 @@
|
||||
|
||||
}
|
||||
|
||||
.view-selector {
|
||||
.view-options {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
|
@ -219,10 +219,14 @@ var ContentView = React.createClass({
|
||||
return <TooLarge {...this.props} onClick={this.displayLarge}/>;
|
||||
}
|
||||
|
||||
var downloadUrl = MessageUtils.getContentURL(this.props.flow, message);
|
||||
|
||||
return <div>
|
||||
<this.state.View {...this.props} />
|
||||
<div className="text-center">
|
||||
<div className="view-options text-center">
|
||||
<ViewSelector selectView={this.selectView} active={this.state.View} message={message}/>
|
||||
|
||||
<a className="btn btn-default btn-xs" href={downloadUrl}><i className="fa fa-download"/></a>
|
||||
</div>
|
||||
</div>;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user