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 {
|
.flow-detail hr {
|
||||||
margin: 0 0 5px;
|
margin: 0 0 5px;
|
||||||
}
|
}
|
||||||
.view-selector {
|
.view-options {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
.flow-detail table {
|
.flow-detail table {
|
||||||
|
@ -1416,10 +1416,14 @@ var ContentView = React.createClass({displayName: "ContentView",
|
|||||||
return React.createElement(TooLarge, React.__spread({}, this.props, {onClick: this.displayLarge}));
|
return React.createElement(TooLarge, React.__spread({}, this.props, {onClick: this.displayLarge}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var downloadUrl = MessageUtils.getContentURL(this.props.flow, message);
|
||||||
|
|
||||||
return React.createElement("div", null,
|
return React.createElement("div", null,
|
||||||
React.createElement(this.state.View, React.__spread({}, this.props)),
|
React.createElement(this.state.View, React.__spread({}, this.props)),
|
||||||
React.createElement("div", {className: "text-center"},
|
React.createElement("div", {className: "view-options text-center"},
|
||||||
React.createElement(ViewSelector, {selectView: this.selectView, active: this.state.View, message: message})
|
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;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -219,10 +219,14 @@ var ContentView = React.createClass({
|
|||||||
return <TooLarge {...this.props} onClick={this.displayLarge}/>;
|
return <TooLarge {...this.props} onClick={this.displayLarge}/>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var downloadUrl = MessageUtils.getContentURL(this.props.flow, message);
|
||||||
|
|
||||||
return <div>
|
return <div>
|
||||||
<this.state.View {...this.props} />
|
<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}/>
|
<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>
|
||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user