From 1baefcdc99bd8e4ee6bf7620965d51d1aab6ddd4 Mon Sep 17 00:00:00 2001
From: Jason <jason.daurus@gmail.com>
Date: Thu, 9 Jun 2016 18:13:18 +0800
Subject: [web] footer.js -> Footer.jsx

---
 web/src/js/components/Footer.jsx | 47 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 web/src/js/components/Footer.jsx

(limited to 'web/src/js/components/Footer.jsx')

diff --git a/web/src/js/components/Footer.jsx b/web/src/js/components/Footer.jsx
new file mode 100644
index 00000000..903522f4
--- /dev/null
+++ b/web/src/js/components/Footer.jsx
@@ -0,0 +1,47 @@
+import React from 'react'
+import { formatSize } from '../utils.js'
+import { SettingsState } from './common.js'
+
+Footer.propTypes = {
+    settings: React.PropTypes.object.isRequired,
+}
+
+export default function Footer({ settings }) {
+    return (
+        <footer>
+            {settings.mode && settings.mode != "regular" && (
+                <span className="label label-success">{settings.mode} mode</span>
+            )}
+            {settings.intercept && (
+                <span className="label label-success">Intercept: {settings.intercept}</span>
+            )}
+            {settings.showhost && (
+                <span className="label label-success">showhost</span>
+            )}
+            {settings.no_upstream_cert && (
+                <span className="label label-success">no-upstream-cert</span>
+            )}
+            {settings.rawtcp && (
+                <span className="label label-success">raw-tcp</span>
+            )}
+            {!settings.http2 && (
+                <span className="label label-success">no-http2</span>
+            )}
+            {settings.anticache && (
+                <span className="label label-success">anticache</span>
+            )}
+            {settings.anticomp && (
+                <span className="label label-success">anticomp</span>
+            )}
+            {settings.stickyauth && (
+                <span className="label label-success">stickyauth: {settings.stickyauth}</span>
+            )}
+            {settings.stickycookie && (
+                <span className="label label-success">stickycookie: {settings.stickycookie}</span>
+            )}
+            {settings.stream && (
+                <span className="label label-success">stream: {formatSize(settings.stream)}</span>
+            )}
+        </footer>
+    )
+}
-- 
cgit v1.2.3

