aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/components/ContentView/DownloadContentButton.jsx
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-07-25 17:03:50 -0700
committerMaximilian Hils <git@maximilianhils.com>2016-07-25 17:03:50 -0700
commit70dbd1b32d13d30e15c03ee91b0fab7bfdf429b3 (patch)
tree8c15d471934ac4b2c898725a2929f30f8dc7f9dd /web/src/js/components/ContentView/DownloadContentButton.jsx
parent79ebcb046e8669f80357a6c3046ec76c6adf49be (diff)
downloadmitmproxy-70dbd1b32d13d30e15c03ee91b0fab7bfdf429b3.tar.gz
mitmproxy-70dbd1b32d13d30e15c03ee91b0fab7bfdf429b3.tar.bz2
mitmproxy-70dbd1b32d13d30e15c03ee91b0fab7bfdf429b3.zip
web: refactor ContentLoader
Diffstat (limited to 'web/src/js/components/ContentView/DownloadContentButton.jsx')
-rw-r--r--web/src/js/components/ContentView/DownloadContentButton.jsx18
1 files changed, 18 insertions, 0 deletions
diff --git a/web/src/js/components/ContentView/DownloadContentButton.jsx b/web/src/js/components/ContentView/DownloadContentButton.jsx
new file mode 100644
index 00000000..3f11f909
--- /dev/null
+++ b/web/src/js/components/ContentView/DownloadContentButton.jsx
@@ -0,0 +1,18 @@
+import { MessageUtils } from "../../flow/utils"
+import { PropTypes } from 'react'
+
+DownloadContentButton.propTypes = {
+ flow: PropTypes.object.isRequired,
+ message: PropTypes.object.isRequired,
+}
+
+export default function DownloadContentButton({ flow, message }) {
+
+ return (
+ <a className="btn btn-default btn-xs"
+ href={MessageUtils.getContentURL(flow, message)}
+ title="Download the content of the flow.">
+ <i className="fa fa-download"/>
+ </a>
+ )
+}