mirror of
https://github.com/mitmproxy/mitmproxy.git
synced 2024-11-25 06:09:50 +00:00
s/filter/search/
no matter what we agree on in #542, this needs to be done anyway.
This commit is contained in:
parent
a32698fc04
commit
737002921e
@ -425,7 +425,7 @@ var FlowActions = {
|
||||
};
|
||||
|
||||
var Query = {
|
||||
FILTER: "f",
|
||||
SEARCH: "s",
|
||||
HIGHLIGHT: "h",
|
||||
SHOW_EVENTLOG: "e"
|
||||
};
|
||||
@ -2364,7 +2364,7 @@ var MainMenu = React.createClass({displayName: "MainMenu",
|
||||
},
|
||||
onFilterChange: function (val) {
|
||||
var d = {};
|
||||
d[Query.FILTER] = val;
|
||||
d[Query.SEARCH] = val;
|
||||
this.setQuery(d);
|
||||
},
|
||||
onHighlightChange: function (val) {
|
||||
@ -2376,7 +2376,7 @@ var MainMenu = React.createClass({displayName: "MainMenu",
|
||||
actions.SettingsActions.update({intercept: val});
|
||||
},
|
||||
render: function () {
|
||||
var filter = this.getQuery()[Query.FILTER] || "";
|
||||
var search = this.getQuery()[Query.SEARCH] || "";
|
||||
var highlight = this.getQuery()[Query.HIGHLIGHT] || "";
|
||||
var intercept = this.state.settings.intercept || "";
|
||||
|
||||
@ -2384,11 +2384,11 @@ var MainMenu = React.createClass({displayName: "MainMenu",
|
||||
React.createElement("div", null,
|
||||
React.createElement("div", {className: "menu-row"},
|
||||
React.createElement(FilterInput, {
|
||||
ref: "filter",
|
||||
placeholder: "Filter",
|
||||
type: "filter",
|
||||
ref: "search",
|
||||
placeholder: "Search",
|
||||
type: "search",
|
||||
color: "black",
|
||||
value: filter,
|
||||
value: search,
|
||||
onChange: this.onFilterChange}),
|
||||
React.createElement(FilterInput, {
|
||||
ref: "highlight",
|
||||
@ -2639,7 +2639,7 @@ var MainView = React.createClass({displayName: "MainView",
|
||||
},
|
||||
getViewFilt: function () {
|
||||
try {
|
||||
var filt = Filt.parse(this.getQuery()[Query.FILTER] || "");
|
||||
var filt = Filt.parse(this.getQuery()[Query.SEARCH] || "");
|
||||
var highlightStr = this.getQuery()[Query.HIGHLIGHT];
|
||||
var highlight = highlightStr ? Filt.parse(highlightStr) : false;
|
||||
} catch (e) {
|
||||
@ -2655,7 +2655,7 @@ var MainView = React.createClass({displayName: "MainView",
|
||||
};
|
||||
},
|
||||
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]);
|
||||
if (filterChanged || highlightChanged) {
|
||||
this.state.view.recalculate(this.getViewFilt(), this.state.sortKeyFun);
|
||||
|
@ -121,7 +121,7 @@ var FlowActions = {
|
||||
};
|
||||
|
||||
var Query = {
|
||||
FILTER: "f",
|
||||
SEARCH: "s",
|
||||
HIGHLIGHT: "h",
|
||||
SHOW_EVENTLOG: "e"
|
||||
};
|
||||
|
@ -167,7 +167,7 @@ var MainMenu = React.createClass({
|
||||
},
|
||||
onFilterChange: function (val) {
|
||||
var d = {};
|
||||
d[Query.FILTER] = val;
|
||||
d[Query.SEARCH] = val;
|
||||
this.setQuery(d);
|
||||
},
|
||||
onHighlightChange: function (val) {
|
||||
@ -179,7 +179,7 @@ var MainMenu = React.createClass({
|
||||
actions.SettingsActions.update({intercept: val});
|
||||
},
|
||||
render: function () {
|
||||
var filter = this.getQuery()[Query.FILTER] || "";
|
||||
var search = this.getQuery()[Query.SEARCH] || "";
|
||||
var highlight = this.getQuery()[Query.HIGHLIGHT] || "";
|
||||
var intercept = this.state.settings.intercept || "";
|
||||
|
||||
@ -187,11 +187,11 @@ var MainMenu = React.createClass({
|
||||
<div>
|
||||
<div className="menu-row">
|
||||
<FilterInput
|
||||
ref="filter"
|
||||
placeholder="Filter"
|
||||
type="filter"
|
||||
ref="search"
|
||||
placeholder="Search"
|
||||
type="search"
|
||||
color="black"
|
||||
value={filter}
|
||||
value={search}
|
||||
onChange={this.onFilterChange} />
|
||||
<FilterInput
|
||||
ref="highlight"
|
||||
|
@ -41,7 +41,7 @@ var MainView = React.createClass({
|
||||
},
|
||||
getViewFilt: function () {
|
||||
try {
|
||||
var filt = Filt.parse(this.getQuery()[Query.FILTER] || "");
|
||||
var filt = Filt.parse(this.getQuery()[Query.SEARCH] || "");
|
||||
var highlightStr = this.getQuery()[Query.HIGHLIGHT];
|
||||
var highlight = highlightStr ? Filt.parse(highlightStr) : false;
|
||||
} catch (e) {
|
||||
@ -57,7 +57,7 @@ var MainView = React.createClass({
|
||||
};
|
||||
},
|
||||
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]);
|
||||
if (filterChanged || highlightChanged) {
|
||||
this.state.view.recalculate(this.getViewFilt(), this.state.sortKeyFun);
|
||||
|
Loading…
Reference in New Issue
Block a user