mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 08:11:00 +00:00
Colorize arrows!
This commit is contained in:
parent
2927d66d01
commit
607d86965e
@ -144,9 +144,9 @@ class FlowDetails(tabs.Tabs):
|
|||||||
|
|
||||||
for line in lines:
|
for line in lines:
|
||||||
if message["from_client"]:
|
if message["from_client"]:
|
||||||
line.insert(0, f"{common.SYMBOL_FROM_CLIENT} ")
|
line.insert(0, ("from_client", f"{common.SYMBOL_FROM_CLIENT} "))
|
||||||
else:
|
else:
|
||||||
line.insert(0, f"{common.SYMBOL_TO_CLIENT} ")
|
line.insert(0, ("to_client", f"{common.SYMBOL_TO_CLIENT} "))
|
||||||
|
|
||||||
widget_lines.append(urwid.Text(line))
|
widget_lines.append(urwid.Text(line))
|
||||||
|
|
||||||
|
@ -37,6 +37,9 @@ class Palette:
|
|||||||
# JSON view
|
# JSON view
|
||||||
'json_string', 'json_number', 'json_boolean',
|
'json_string', 'json_number', 'json_boolean',
|
||||||
|
|
||||||
|
# TCP flow details
|
||||||
|
'from_client', 'to_client',
|
||||||
|
|
||||||
# Grid Editor
|
# Grid Editor
|
||||||
'focusfield', 'focusfield_error', 'field_error', 'editfield',
|
'focusfield', 'focusfield_error', 'field_error', 'editfield',
|
||||||
|
|
||||||
@ -177,6 +180,10 @@ class LowDark(Palette):
|
|||||||
json_number = ('light magenta', 'default'),
|
json_number = ('light magenta', 'default'),
|
||||||
json_boolean = ('dark magenta', 'default'),
|
json_boolean = ('dark magenta', 'default'),
|
||||||
|
|
||||||
|
# TCP flow details
|
||||||
|
from_client = ('light blue', 'default'),
|
||||||
|
to_client = ('light red', 'default'),
|
||||||
|
|
||||||
# Grid Editor
|
# Grid Editor
|
||||||
focusfield = ('black', 'light gray'),
|
focusfield = ('black', 'light gray'),
|
||||||
focusfield_error = ('dark red', 'light gray'),
|
focusfield_error = ('dark red', 'light gray'),
|
||||||
@ -282,6 +289,10 @@ class LowLight(Palette):
|
|||||||
json_number = ('light magenta', 'default'),
|
json_number = ('light magenta', 'default'),
|
||||||
json_boolean = ('dark magenta', 'default'),
|
json_boolean = ('dark magenta', 'default'),
|
||||||
|
|
||||||
|
# TCP flow details
|
||||||
|
from_client = ('dark blue', 'default'),
|
||||||
|
to_client = ('dark red', 'default'),
|
||||||
|
|
||||||
# Grid Editor
|
# Grid Editor
|
||||||
focusfield = ('black', 'light gray'),
|
focusfield = ('black', 'light gray'),
|
||||||
focusfield_error = ('dark red', 'light gray'),
|
focusfield_error = ('dark red', 'light gray'),
|
||||||
@ -397,6 +408,10 @@ class SolarizedLight(LowLight):
|
|||||||
json_number = (sol_blue, 'default'),
|
json_number = (sol_blue, 'default'),
|
||||||
json_boolean = (sol_magenta, 'default'),
|
json_boolean = (sol_magenta, 'default'),
|
||||||
|
|
||||||
|
# TCP flow details
|
||||||
|
from_client = (sol_blue, 'default'),
|
||||||
|
to_client = (sol_red, 'default'),
|
||||||
|
|
||||||
# Grid Editor
|
# Grid Editor
|
||||||
focusfield = (sol_base00, sol_base2),
|
focusfield = (sol_base00, sol_base2),
|
||||||
focusfield_error = (sol_red, sol_base2),
|
focusfield_error = (sol_red, sol_base2),
|
||||||
@ -475,6 +490,10 @@ class SolarizedDark(LowDark):
|
|||||||
json_number = (sol_blue, 'default'),
|
json_number = (sol_blue, 'default'),
|
||||||
json_boolean = (sol_magenta, 'default'),
|
json_boolean = (sol_magenta, 'default'),
|
||||||
|
|
||||||
|
# TCP flow details
|
||||||
|
from_client = (sol_blue, 'default'),
|
||||||
|
to_client = (sol_red, 'default'),
|
||||||
|
|
||||||
# Grid Editor
|
# Grid Editor
|
||||||
focusfield = (sol_base0, sol_base02),
|
focusfield = (sol_base0, sol_base02),
|
||||||
focusfield_error = (sol_red, sol_base02),
|
focusfield_error = (sol_red, sol_base02),
|
||||||
|
Loading…
Reference in New Issue
Block a user