From f870ccd949ca46e6a1ca48a6d5e40589fad41ce2 Mon Sep 17 00:00:00 2001
From: Maximilian Hils <git@maximilianhils.com>
Date: Wed, 25 Oct 2017 14:00:33 +0200
Subject: [web] remove prompt

---
 web/src/js/components/Header/FileMenu.jsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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

diff --git a/web/src/js/components/Header/FileMenu.jsx b/web/src/js/components/Header/FileMenu.jsx
index 5cb8e507..1e3b9268 100644
--- a/web/src/js/components/Header/FileMenu.jsx
+++ b/web/src/js/components/Header/FileMenu.jsx
@@ -20,7 +20,7 @@ FileMenu.onNewClick = (e, clearFlows) => {
         clearFlows()
 }
 
-export function FileMenu ({clearFlows, loadFlows, saveFlows, openModal}) {
+export function FileMenu ({clearFlows, loadFlows, saveFlows, openOptions}) {
      return (
         <Dropdown className="pull-left" btnClass="special" text="mitmproxy">
             <a href="#" onClick={e => FileMenu.onNewClick(e, clearFlows)}>
@@ -38,7 +38,7 @@ export function FileMenu ({clearFlows, loadFlows, saveFlows, openModal}) {
             </a>
 
             <HideInStatic>
-            <a href="#" onClick={e => { e.preventDefault(); openModal(); }}>
+            <a href="#" onClick={e => { e.preventDefault(); openOptions(); }}>
                 <i className="fa fa-fw fa-cog"></i>
                 &nbsp;Options
             </a>
@@ -59,6 +59,6 @@ export default connect(
         clearFlows: flowsActions.clear,
         loadFlows: flowsActions.upload,
         saveFlows: flowsActions.download,
-        openModal: () => modalActions.setActiveModal('OptionModal'),
+        openOptions: () => modalActions.setActiveModal('OptionModal'),
     }
 )(FileMenu)
-- 
cgit v1.2.3


From c2401e35f4483e68116b8e90bb58b70659ace682 Mon Sep 17 00:00:00 2001
From: Maximilian Hils <git@maximilianhils.com>
Date: Wed, 25 Oct 2017 15:57:16 +0200
Subject: [web] move options editor from file menu to options menu

ultimately we probably want to open the options editor immediately if someone presses "Options".
This still requires us to

  1. have a nicer editors for common settings.
  2. Add a "view event log" button somewhere else,
     for example in the footer.

For now, the options editor is marked as beta, as there are some options you
clearly do not want to edit (e.g. wfile).
---
 web/src/js/components/Header/FileMenu.jsx | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

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

diff --git a/web/src/js/components/Header/FileMenu.jsx b/web/src/js/components/Header/FileMenu.jsx
index 1e3b9268..c88efcd8 100644
--- a/web/src/js/components/Header/FileMenu.jsx
+++ b/web/src/js/components/Header/FileMenu.jsx
@@ -11,7 +11,6 @@ FileMenu.propTypes = {
     clearFlows: PropTypes.func.isRequired,
     loadFlows: PropTypes.func.isRequired,
     saveFlows: PropTypes.func.isRequired,
-    openModal: PropTypes.func.isRequired,
 }
 
 FileMenu.onNewClick = (e, clearFlows) => {
@@ -20,7 +19,7 @@ FileMenu.onNewClick = (e, clearFlows) => {
         clearFlows()
 }
 
-export function FileMenu ({clearFlows, loadFlows, saveFlows, openOptions}) {
+export function FileMenu ({clearFlows, loadFlows, saveFlows}) {
      return (
         <Dropdown className="pull-left" btnClass="special" text="mitmproxy">
             <a href="#" onClick={e => FileMenu.onNewClick(e, clearFlows)}>
@@ -38,12 +37,7 @@ export function FileMenu ({clearFlows, loadFlows, saveFlows, openOptions}) {
             </a>
 
             <HideInStatic>
-            <a href="#" onClick={e => { e.preventDefault(); openOptions(); }}>
-                <i className="fa fa-fw fa-cog"></i>
-                &nbsp;Options
-            </a>
             <Divider/>
-
             <a href="http://mitm.it/" target="_blank">
                 <i className="fa fa-fw fa-external-link"></i>
                 &nbsp;Install Certificates...
@@ -59,6 +53,5 @@ export default connect(
         clearFlows: flowsActions.clear,
         loadFlows: flowsActions.upload,
         saveFlows: flowsActions.download,
-        openOptions: () => modalActions.setActiveModal('OptionModal'),
     }
 )(FileMenu)
-- 
cgit v1.2.3

