mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-25 09:37:37 +00:00
change import of prop-types
This commit is contained in:
parent
2a46f3851a
commit
115a31c9ba
26
mitmproxy/tools/web/static/app.css
vendored
26
mitmproxy/tools/web/static/app.css
vendored
@ -226,14 +226,28 @@ header menu {
|
||||
}
|
||||
.filter-input .popover {
|
||||
top: 27px;
|
||||
left: 43px;
|
||||
display: block;
|
||||
max-width: none;
|
||||
opacity: 0.9;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.filter-input .popover {
|
||||
top: 16px;
|
||||
left: 29px;
|
||||
right: 2px;
|
||||
}
|
||||
}
|
||||
.filter-input .popover .popover-content {
|
||||
max-height: 500px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.filter-input .popover .popover-content tr {
|
||||
cursor: pointer;
|
||||
}
|
||||
.filter-input .popover .popover-content tr:hover {
|
||||
background-color: rgba(193, 215, 235, 0.5) !important;
|
||||
}
|
||||
.flow-table {
|
||||
width: 100%;
|
||||
overflow-y: scroll;
|
||||
@ -358,8 +372,7 @@ header menu {
|
||||
background-color: #F2F2F2;
|
||||
}
|
||||
.flow-detail section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.flow-detail section > article {
|
||||
overflow: auto;
|
||||
@ -790,11 +803,8 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
cursor: default;
|
||||
z-index: 4;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper ::selection { background-color: transparent }
|
||||
.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }
|
||||
|
||||
.CodeMirror-lines {
|
||||
cursor: text;
|
||||
@ -839,6 +849,8 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
|
||||
.CodeMirror-widget {}
|
||||
|
||||
.CodeMirror-rtl pre { direction: rtl; }
|
||||
|
||||
.CodeMirror-code {
|
||||
outline: none;
|
||||
}
|
||||
|
719
mitmproxy/tools/web/static/app.js
vendored
719
mitmproxy/tools/web/static/app.js
vendored
File diff suppressed because it is too large
Load Diff
9499
mitmproxy/tools/web/static/vendor.js
vendored
9499
mitmproxy/tools/web/static/vendor.js
vendored
File diff suppressed because it is too large
Load Diff
@ -25,6 +25,7 @@
|
||||
"classnames": "^2.2.5",
|
||||
"lodash": "^4.17.4",
|
||||
"react": "^15.4.2",
|
||||
"prop-types": "^15.5.0",
|
||||
"react-codemirror": "^0.3.0",
|
||||
"react-dom": "^15.4.2",
|
||||
"react-redux": "^5.0.2",
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { Component, PropTypes } from 'react'
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { connect } from 'react-redux'
|
||||
import * as ContentViews from './ContentView/ContentViews'
|
||||
import * as MetaViews from './ContentView/MetaViews'
|
||||
@ -11,8 +12,8 @@ ContentView.propTypes = {
|
||||
// It may seem a bit weird at the first glance:
|
||||
// Every view takes the flow and the message as props, e.g.
|
||||
// <Auto flow={flow} message={flow.request}/>
|
||||
flow: React.PropTypes.object.isRequired,
|
||||
message: React.PropTypes.object.isRequired,
|
||||
flow: PropTypes.object.isRequired,
|
||||
message: PropTypes.object.isRequired,
|
||||
}
|
||||
|
||||
ContentView.isContentTooLarge = msg => msg.contentLength > 1024 * 1024 * (ContentViews.ViewImage.matches(msg) ? 10 : 0.2)
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, {PropTypes} from 'react'
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import Codemirror from 'react-codemirror';
|
||||
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { Component, PropTypes } from 'react'
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { MessageUtils } from '../../flow/utils.js'
|
||||
|
||||
export default View => class extends React.Component {
|
||||
|
@ -1,12 +1,13 @@
|
||||
import React, { PropTypes } from 'react'
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { connect } from 'react-redux'
|
||||
import ViewSelector from './ViewSelector'
|
||||
import UploadContentButton from './UploadContentButton'
|
||||
import DownloadContentButton from './DownloadContentButton'
|
||||
|
||||
ContentViewOptions.propTypes = {
|
||||
flow: React.PropTypes.object.isRequired,
|
||||
message: React.PropTypes.object.isRequired,
|
||||
flow: PropTypes.object.isRequired,
|
||||
message: PropTypes.object.isRequired,
|
||||
}
|
||||
|
||||
function ContentViewOptions({ flow, message, uploadContent, readonly, contentViewDescription }) {
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { PropTypes, Component } from 'react'
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { connect } from 'react-redux'
|
||||
import { setContentViewDescription, setContent } from '../../ducks/ui/flow'
|
||||
import ContentLoader from './ContentLoader'
|
||||
@ -21,7 +22,7 @@ function ViewImage({ flow, message }) {
|
||||
}
|
||||
|
||||
Edit.propTypes = {
|
||||
content: React.PropTypes.string.isRequired,
|
||||
content: PropTypes.string.isRequired,
|
||||
}
|
||||
|
||||
function Edit({ content, onChange }) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { MessageUtils } from "../../flow/utils"
|
||||
import { PropTypes } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
|
||||
DownloadContentButton.propTypes = {
|
||||
flow: PropTypes.object.isRequired,
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { Component, PropTypes } from 'react'
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { connect } from 'react-redux'
|
||||
import { render } from 'react-dom';
|
||||
import Button from '../common/Button';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { PropTypes } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import FileChooser from '../common/FileChooser'
|
||||
|
||||
UploadContentButton.propTypes = {
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { PropTypes, Component } from 'react'
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { connect } from 'react-redux'
|
||||
import { setContentView } from '../../ducks/ui/flow';
|
||||
import Dropdown from '../common/Dropdown'
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { Component, PropTypes } from 'react'
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { connect } from 'react-redux'
|
||||
import { toggleFilter, toggleVisibility } from '../ducks/eventLog'
|
||||
import ToggleButton from './common/ToggleButton'
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { Component, PropTypes } from 'react'
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import ReactDOM from 'react-dom'
|
||||
import shallowEqual from 'shallowequal'
|
||||
import AutoScroll from '../helpers/AutoScroll'
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { PropTypes } from 'react'
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import ReactDOM from 'react-dom'
|
||||
import shallowEqual from 'shallowequal'
|
||||
import AutoScroll from './helpers/AutoScroll'
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { PropTypes } from 'react'
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import classnames from 'classnames'
|
||||
import columns from './FlowColumns'
|
||||
import { pure } from '../../utils'
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { PropTypes } from 'react'
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { connect } from 'react-redux'
|
||||
import classnames from 'classnames'
|
||||
import columns from './FlowColumns'
|
||||
@ -7,8 +8,8 @@ import { setSort } from '../../ducks/flows'
|
||||
|
||||
FlowTableHead.propTypes = {
|
||||
setSort: PropTypes.func.isRequired,
|
||||
sortDesc: React.PropTypes.bool.isRequired,
|
||||
sortColumn: React.PropTypes.string,
|
||||
sortDesc: PropTypes.bool.isRequired,
|
||||
sortColumn: PropTypes.string,
|
||||
}
|
||||
|
||||
function FlowTableHead({ sortColumn, sortDesc, setSort }) {
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { Component, PropTypes } from 'react'
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import ReactDOM from 'react-dom'
|
||||
import ValueEditor from '../ValueEditor/ValueEditor'
|
||||
import { Key } from '../../utils'
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { Component, PropTypes } from 'react'
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { connect } from 'react-redux'
|
||||
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { PropTypes } from 'react'
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { connect } from 'react-redux'
|
||||
import classnames from 'classnames'
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { PropTypes, Component } from 'react'
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { connect } from 'react-redux'
|
||||
|
||||
import { startEdit, stopEdit } from '../../ducks/ui/flow'
|
||||
|
@ -1,9 +1,10 @@
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { connect } from 'react-redux'
|
||||
import { formatSize } from '../utils.js'
|
||||
|
||||
Footer.propTypes = {
|
||||
settings: React.PropTypes.object.isRequired,
|
||||
settings: PropTypes.object.isRequired,
|
||||
}
|
||||
|
||||
function Footer({ settings }) {
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { Component, PropTypes } from 'react'
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { connect } from 'react-redux'
|
||||
import classnames from 'classnames'
|
||||
import MainMenu from './Header/MainMenu'
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { Component, PropTypes } from 'react'
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { connect } from 'react-redux'
|
||||
import FileChooser from '../common/FileChooser'
|
||||
import Dropdown, {Divider} from '../common/Dropdown'
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { PropTypes, Component } from 'react'
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import ReactDOM from 'react-dom'
|
||||
import classnames from 'classnames'
|
||||
import { Key } from '../../utils.js'
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { PropTypes } from "react"
|
||||
import React from "react"
|
||||
import PropTypes from 'prop-types'
|
||||
import { connect } from "react-redux"
|
||||
import Button from "../common/Button"
|
||||
import { MessageUtils } from "../../flow/utils.js"
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { Component, PropTypes } from "react"
|
||||
import React, { Component } from "react"
|
||||
import PropTypes from 'prop-types'
|
||||
import { connect } from "react-redux"
|
||||
import FilterInput from "./FilterInput"
|
||||
import { update as updateSettings } from "../../ducks/settings"
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { PropTypes } from "react"
|
||||
import PropTypes from 'prop-types'
|
||||
import { connect } from "react-redux"
|
||||
import { update as updateSettings } from "../../ducks/settings"
|
||||
import { toggleVisibility } from "../../ducks/eventLog"
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { PropTypes } from "react"
|
||||
import React from "react"
|
||||
import PropTypes from 'prop-types'
|
||||
import { connect } from "react-redux"
|
||||
import { SettingsToggle, EventlogToggle } from "./MenuToggle"
|
||||
import DocsLink from "../common/DocsLink"
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { Component, PropTypes } from 'react'
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { connect } from 'react-redux'
|
||||
import Splitter from './common/Splitter'
|
||||
import FlowTable from './FlowTable'
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { PropTypes } from 'react'
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import ReactDOM from 'react-dom'
|
||||
import _ from 'lodash'
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { Component, PropTypes } from 'react'
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { connect } from 'react-redux'
|
||||
|
||||
import { onKeyDown } from '../ducks/ui/keyboard'
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { Component, PropTypes } from 'react'
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import ValueEditor from './ValueEditor'
|
||||
import classnames from 'classnames'
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { Component, PropTypes } from 'react'
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import _ from "lodash"
|
||||
import classnames from 'classnames'
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { PropTypes } from "react"
|
||||
import React from "react"
|
||||
import PropTypes from 'prop-types'
|
||||
import classnames from "classnames"
|
||||
|
||||
Button.propTypes = {
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { Component, PropTypes } from 'react'
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import classnames from 'classnames'
|
||||
|
||||
export const Divider = () => <hr className="divider"/>
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { PropTypes } from 'react'
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
|
||||
FileChooser.propTypes = {
|
||||
icon: PropTypes.string,
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { PropTypes } from 'react'
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
|
||||
ToggleButton.propTypes = {
|
||||
checked: PropTypes.bool.isRequired,
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { Component, PropTypes } from 'react'
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import classnames from 'classnames'
|
||||
import { Key } from '../../utils'
|
||||
|
||||
|
@ -1953,7 +1953,7 @@ module.exports = (function() {
|
||||
function domain(regex){
|
||||
regex = new RegExp(regex, "i");
|
||||
function domainFilter(flow){
|
||||
return flow.request && regex.test(flow.request.host);
|
||||
return flow.request && (regex.test(flow.request.host) || regex.test(flow.request.pretty_host));
|
||||
}
|
||||
domainFilter.desc = "domain matches " + regex;
|
||||
return domainFilter;
|
||||
|
Loading…
Reference in New Issue
Block a user