From c2401e35f4483e68116b8e90bb58b70659ace682 Mon Sep 17 00:00:00 2001 From: Maximilian Hils 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 +--- web/src/js/components/Header/OptionMenu.jsx | 84 ++++++++++++----------------- 2 files changed, 34 insertions(+), 59 deletions(-) (limited to 'web/src') 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 ( FileMenu.onNewClick(e, clearFlows)}> @@ -38,12 +37,7 @@ export function FileMenu ({clearFlows, loadFlows, saveFlows, openOptions}) { - { e.preventDefault(); openOptions(); }}> - -  Options - -  Install Certificates... @@ -59,6 +53,5 @@ export default connect( clearFlows: flowsActions.clear, loadFlows: flowsActions.upload, saveFlows: flowsActions.download, - openOptions: () => modalActions.setActiveModal('OptionModal'), } )(FileMenu) diff --git a/web/src/js/components/Header/OptionMenu.jsx b/web/src/js/components/Header/OptionMenu.jsx index c41c9d99..765129ed 100644 --- a/web/src/js/components/Header/OptionMenu.jsx +++ b/web/src/js/components/Header/OptionMenu.jsx @@ -1,74 +1,56 @@ -import React from "react" -import PropTypes from 'prop-types' +import React from "react" import { connect } from "react-redux" -import { SettingsToggle, EventlogToggle } from "./MenuToggle" +import { EventlogToggle, SettingsToggle } from "./MenuToggle" +import Button from "../common/Button" import DocsLink from "../common/DocsLink" import HideInStatic from "../common/HideInStatic"; +import * as modalActions from "../../ducks/ui/modal" OptionMenu.title = 'Options' -export default function OptionMenu() { +function OptionMenu({ openOptions }) { return (
-
-
- HTTP/2.0 - WebSockets - Raw TCP +
+
+ +
+
Options Editor
-
Protocol Support
-
-
-
- - Disable Caching - - - Disable Compression - +
+
+ + Strip cache headers + + + Use host header for display + + + Verify server certificates + +
+
Quick Options
-
HTTP Options
-
- - - Use Host Header - - -
View Options
- { /* - updateSettings({ no_upstream_cert: !settings.no_upstream_cert })} - /> - updateSettings({ stickyauth: !settings.stickyauth ? txt : null })} - /> - updateSettings({ stickycookie: !settings.stickycookie ? txt : null })} - /> - updateSettings({ stream_large_bodies: !settings.stream_large_bodies ? txt : null })} - /> - */}
) } + +export default connect( + null, + { + openOptions: () => modalActions.setActiveModal('OptionModal') + } +)(OptionMenu) -- cgit v1.2.3