mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 15:37:45 +00:00
Fix #2134
This commit is contained in:
parent
253fa95018
commit
125ae2d8f9
@ -55,7 +55,7 @@ class EventLog extends Component {
|
|||||||
<div onMouseDown={this.onDragStart}>
|
<div onMouseDown={this.onDragStart}>
|
||||||
Eventlog
|
Eventlog
|
||||||
<div className="pull-right">
|
<div className="pull-right">
|
||||||
{['debug', 'info', 'web'].map(type => (
|
{['debug', 'info', 'web', 'warn', 'error'].map(type => (
|
||||||
<ToggleButton key={type} text={type} checked={filters[type]} onToggle={() => toggleFilter(type)}/>
|
<ToggleButton key={type} text={type} checked={filters[type]} onToggle={() => toggleFilter(type)}/>
|
||||||
))}
|
))}
|
||||||
<i onClick={close} className="fa fa-close"></i>
|
<i onClick={close} className="fa fa-close"></i>
|
||||||
|
@ -83,7 +83,12 @@ class EventLogList extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function LogIcon({ event }) {
|
function LogIcon({ event }) {
|
||||||
const icon = { web: 'html5', debug: 'bug' }[event.level] || 'info'
|
const icon = {
|
||||||
|
web: 'html5',
|
||||||
|
debug: 'bug',
|
||||||
|
warn: 'exclamation-triangle',
|
||||||
|
error: 'ban'
|
||||||
|
}[event.level] || 'info'
|
||||||
return <i className={`fa fa-fw fa-${icon}`}></i>
|
return <i className={`fa fa-fw fa-${icon}`}></i>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ export const TOGGLE_FILTER = 'EVENTS_TOGGLE_FILTER'
|
|||||||
|
|
||||||
const defaultState = {
|
const defaultState = {
|
||||||
visible: false,
|
visible: false,
|
||||||
filters: { debug: false, info: true, web: true },
|
filters: { debug: false, info: true, web: true, warn: true, error: true },
|
||||||
...reduceStore(undefined, {}),
|
...reduceStore(undefined, {}),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user