aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mitmproxy/web/static/app.js11
-rw-r--r--web/src/js/components/footer.js12
2 files changed, 12 insertions, 11 deletions
diff --git a/mitmproxy/web/static/app.js b/mitmproxy/web/static/app.js
index 997d8ed4..bb06970e 100644
--- a/mitmproxy/web/static/app.js
+++ b/mitmproxy/web/static/app.js
@@ -2767,25 +2767,24 @@ Footer.propTypes = {
function Footer(_ref) {
var settings = _ref.settings;
-
var mode = settings.mode;
var intercept = settings.intercept;
+
return _react2.default.createElement(
"footer",
null,
- mode && mode != "regular" ? _react2.default.createElement(
+ mode && mode != "regular" && _react2.default.createElement(
"span",
{ className: "label label-success" },
mode,
" mode"
- ) : null,
- " ",
- intercept ? _react2.default.createElement(
+ ),
+ intercept && _react2.default.createElement(
"span",
{ className: "label label-success" },
"Intercept: ",
intercept
- ) : null
+ )
);
}
diff --git a/web/src/js/components/footer.js b/web/src/js/components/footer.js
index 7d313b02..e2d96288 100644
--- a/web/src/js/components/footer.js
+++ b/web/src/js/components/footer.js
@@ -6,13 +6,15 @@ Footer.propTypes = {
};
export default function Footer({ settings }) {
- const mode = settings.mode;
- const intercept = settings.intercept;
+ const {mode, intercept} = settings;
return (
<footer>
- {mode && mode != "regular" ? <span className="label label-success">{mode} mode</span> : null}
- &nbsp;
- {intercept ? <span className="label label-success">Intercept: {intercept}</span> : null}
+ {mode && mode != "regular" && (
+ <span className="label label-success">{mode} mode</span>
+ )}
+ {intercept && (
+ <span className="label label-success">Intercept: {intercept}</span>
+ )}
</footer>
);
}