mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +00:00
Merge branch 'master' of ssh.github.com:mitmproxy/mitmproxy
This commit is contained in:
commit
ad08b80c43
@ -425,7 +425,7 @@ var FlowActions = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var Query = {
|
var Query = {
|
||||||
FILTER: "f",
|
SEARCH: "s",
|
||||||
HIGHLIGHT: "h",
|
HIGHLIGHT: "h",
|
||||||
SHOW_EVENTLOG: "e"
|
SHOW_EVENTLOG: "e"
|
||||||
};
|
};
|
||||||
@ -2364,7 +2364,7 @@ var MainMenu = React.createClass({displayName: "MainMenu",
|
|||||||
},
|
},
|
||||||
onFilterChange: function (val) {
|
onFilterChange: function (val) {
|
||||||
var d = {};
|
var d = {};
|
||||||
d[Query.FILTER] = val;
|
d[Query.SEARCH] = val;
|
||||||
this.setQuery(d);
|
this.setQuery(d);
|
||||||
},
|
},
|
||||||
onHighlightChange: function (val) {
|
onHighlightChange: function (val) {
|
||||||
@ -2376,7 +2376,7 @@ var MainMenu = React.createClass({displayName: "MainMenu",
|
|||||||
actions.SettingsActions.update({intercept: val});
|
actions.SettingsActions.update({intercept: val});
|
||||||
},
|
},
|
||||||
render: function () {
|
render: function () {
|
||||||
var filter = this.getQuery()[Query.FILTER] || "";
|
var search = this.getQuery()[Query.SEARCH] || "";
|
||||||
var highlight = this.getQuery()[Query.HIGHLIGHT] || "";
|
var highlight = this.getQuery()[Query.HIGHLIGHT] || "";
|
||||||
var intercept = this.state.settings.intercept || "";
|
var intercept = this.state.settings.intercept || "";
|
||||||
|
|
||||||
@ -2384,11 +2384,11 @@ var MainMenu = React.createClass({displayName: "MainMenu",
|
|||||||
React.createElement("div", null,
|
React.createElement("div", null,
|
||||||
React.createElement("div", {className: "menu-row"},
|
React.createElement("div", {className: "menu-row"},
|
||||||
React.createElement(FilterInput, {
|
React.createElement(FilterInput, {
|
||||||
ref: "filter",
|
ref: "search",
|
||||||
placeholder: "Filter",
|
placeholder: "Search",
|
||||||
type: "filter",
|
type: "search",
|
||||||
color: "black",
|
color: "black",
|
||||||
value: filter,
|
value: search,
|
||||||
onChange: this.onFilterChange}),
|
onChange: this.onFilterChange}),
|
||||||
React.createElement(FilterInput, {
|
React.createElement(FilterInput, {
|
||||||
ref: "highlight",
|
ref: "highlight",
|
||||||
@ -2639,7 +2639,7 @@ var MainView = React.createClass({displayName: "MainView",
|
|||||||
},
|
},
|
||||||
getViewFilt: function () {
|
getViewFilt: function () {
|
||||||
try {
|
try {
|
||||||
var filt = Filt.parse(this.getQuery()[Query.FILTER] || "");
|
var filt = Filt.parse(this.getQuery()[Query.SEARCH] || "");
|
||||||
var highlightStr = this.getQuery()[Query.HIGHLIGHT];
|
var highlightStr = this.getQuery()[Query.HIGHLIGHT];
|
||||||
var highlight = highlightStr ? Filt.parse(highlightStr) : false;
|
var highlight = highlightStr ? Filt.parse(highlightStr) : false;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@ -2655,7 +2655,7 @@ var MainView = React.createClass({displayName: "MainView",
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
componentWillReceiveProps: function (nextProps) {
|
componentWillReceiveProps: function (nextProps) {
|
||||||
var filterChanged = (this.props.query[Query.FILTER] !== nextProps.query[Query.FILTER]);
|
var filterChanged = (this.props.query[Query.SEARCH] !== nextProps.query[Query.SEARCH]);
|
||||||
var highlightChanged = (this.props.query[Query.HIGHLIGHT] !== nextProps.query[Query.HIGHLIGHT]);
|
var highlightChanged = (this.props.query[Query.HIGHLIGHT] !== nextProps.query[Query.HIGHLIGHT]);
|
||||||
if (filterChanged || highlightChanged) {
|
if (filterChanged || highlightChanged) {
|
||||||
this.state.view.recalculate(this.getViewFilt(), this.state.sortKeyFun);
|
this.state.view.recalculate(this.getViewFilt(), this.state.sortKeyFun);
|
||||||
|
@ -121,7 +121,7 @@ var FlowActions = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var Query = {
|
var Query = {
|
||||||
FILTER: "f",
|
SEARCH: "s",
|
||||||
HIGHLIGHT: "h",
|
HIGHLIGHT: "h",
|
||||||
SHOW_EVENTLOG: "e"
|
SHOW_EVENTLOG: "e"
|
||||||
};
|
};
|
||||||
|
@ -167,7 +167,7 @@ var MainMenu = React.createClass({
|
|||||||
},
|
},
|
||||||
onFilterChange: function (val) {
|
onFilterChange: function (val) {
|
||||||
var d = {};
|
var d = {};
|
||||||
d[Query.FILTER] = val;
|
d[Query.SEARCH] = val;
|
||||||
this.setQuery(d);
|
this.setQuery(d);
|
||||||
},
|
},
|
||||||
onHighlightChange: function (val) {
|
onHighlightChange: function (val) {
|
||||||
@ -179,7 +179,7 @@ var MainMenu = React.createClass({
|
|||||||
actions.SettingsActions.update({intercept: val});
|
actions.SettingsActions.update({intercept: val});
|
||||||
},
|
},
|
||||||
render: function () {
|
render: function () {
|
||||||
var filter = this.getQuery()[Query.FILTER] || "";
|
var search = this.getQuery()[Query.SEARCH] || "";
|
||||||
var highlight = this.getQuery()[Query.HIGHLIGHT] || "";
|
var highlight = this.getQuery()[Query.HIGHLIGHT] || "";
|
||||||
var intercept = this.state.settings.intercept || "";
|
var intercept = this.state.settings.intercept || "";
|
||||||
|
|
||||||
@ -187,11 +187,11 @@ var MainMenu = React.createClass({
|
|||||||
<div>
|
<div>
|
||||||
<div className="menu-row">
|
<div className="menu-row">
|
||||||
<FilterInput
|
<FilterInput
|
||||||
ref="filter"
|
ref="search"
|
||||||
placeholder="Filter"
|
placeholder="Search"
|
||||||
type="filter"
|
type="search"
|
||||||
color="black"
|
color="black"
|
||||||
value={filter}
|
value={search}
|
||||||
onChange={this.onFilterChange} />
|
onChange={this.onFilterChange} />
|
||||||
<FilterInput
|
<FilterInput
|
||||||
ref="highlight"
|
ref="highlight"
|
||||||
|
@ -41,7 +41,7 @@ var MainView = React.createClass({
|
|||||||
},
|
},
|
||||||
getViewFilt: function () {
|
getViewFilt: function () {
|
||||||
try {
|
try {
|
||||||
var filt = Filt.parse(this.getQuery()[Query.FILTER] || "");
|
var filt = Filt.parse(this.getQuery()[Query.SEARCH] || "");
|
||||||
var highlightStr = this.getQuery()[Query.HIGHLIGHT];
|
var highlightStr = this.getQuery()[Query.HIGHLIGHT];
|
||||||
var highlight = highlightStr ? Filt.parse(highlightStr) : false;
|
var highlight = highlightStr ? Filt.parse(highlightStr) : false;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@ -57,7 +57,7 @@ var MainView = React.createClass({
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
componentWillReceiveProps: function (nextProps) {
|
componentWillReceiveProps: function (nextProps) {
|
||||||
var filterChanged = (this.props.query[Query.FILTER] !== nextProps.query[Query.FILTER]);
|
var filterChanged = (this.props.query[Query.SEARCH] !== nextProps.query[Query.SEARCH]);
|
||||||
var highlightChanged = (this.props.query[Query.HIGHLIGHT] !== nextProps.query[Query.HIGHLIGHT]);
|
var highlightChanged = (this.props.query[Query.HIGHLIGHT] !== nextProps.query[Query.HIGHLIGHT]);
|
||||||
if (filterChanged || highlightChanged) {
|
if (filterChanged || highlightChanged) {
|
||||||
this.state.view.recalculate(this.getViewFilt(), this.state.sortKeyFun);
|
this.state.view.recalculate(this.getViewFilt(), this.state.sortKeyFun);
|
||||||
|
Loading…
Reference in New Issue
Block a user