Colorize arrows!

This commit is contained in:
Nikita Stupin 2020-05-02 12:49:02 +03:00
parent 2927d66d01
commit 607d86965e
2 changed files with 21 additions and 2 deletions

View File

@ -144,9 +144,9 @@ class FlowDetails(tabs.Tabs):
for line in lines:
if message["from_client"]:
line.insert(0, f"{common.SYMBOL_FROM_CLIENT} ")
line.insert(0, ("from_client", f"{common.SYMBOL_FROM_CLIENT} "))
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))

View File

@ -37,6 +37,9 @@ class Palette:
# JSON view
'json_string', 'json_number', 'json_boolean',
# TCP flow details
'from_client', 'to_client',
# Grid Editor
'focusfield', 'focusfield_error', 'field_error', 'editfield',
@ -177,6 +180,10 @@ class LowDark(Palette):
json_number = ('light magenta', 'default'),
json_boolean = ('dark magenta', 'default'),
# TCP flow details
from_client = ('light blue', 'default'),
to_client = ('light red', 'default'),
# Grid Editor
focusfield = ('black', 'light gray'),
focusfield_error = ('dark red', 'light gray'),
@ -282,6 +289,10 @@ class LowLight(Palette):
json_number = ('light magenta', 'default'),
json_boolean = ('dark magenta', 'default'),
# TCP flow details
from_client = ('dark blue', 'default'),
to_client = ('dark red', 'default'),
# Grid Editor
focusfield = ('black', 'light gray'),
focusfield_error = ('dark red', 'light gray'),
@ -397,6 +408,10 @@ class SolarizedLight(LowLight):
json_number = (sol_blue, 'default'),
json_boolean = (sol_magenta, 'default'),
# TCP flow details
from_client = (sol_blue, 'default'),
to_client = (sol_red, 'default'),
# Grid Editor
focusfield = (sol_base00, sol_base2),
focusfield_error = (sol_red, sol_base2),
@ -475,6 +490,10 @@ class SolarizedDark(LowDark):
json_number = (sol_blue, 'default'),
json_boolean = (sol_magenta, 'default'),
# TCP flow details
from_client = (sol_blue, 'default'),
to_client = (sol_red, 'default'),
# Grid Editor
focusfield = (sol_base0, sol_base02),
focusfield_error = (sol_red, sol_base02),