mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
Merge pull request #1861 from cortesi/marking
console: mark view indiciator, fix empty flow list behaviour
This commit is contained in:
commit
6695ce4624
@ -178,8 +178,6 @@ class FlowItem(urwid.WidgetWrap):
|
||||
elif key == "m":
|
||||
self.flow.marked = not self.flow.marked
|
||||
signals.flowlist_change.send(self)
|
||||
elif key == "M":
|
||||
self.master.view.toggle_marked()
|
||||
elif key == "r":
|
||||
try:
|
||||
self.master.replay_request(self.flow)
|
||||
@ -375,6 +373,8 @@ class FlowListBox(urwid.ListBox):
|
||||
prompt = "Load flows",
|
||||
callback = self.master.load_flows_callback
|
||||
)
|
||||
elif key == "M":
|
||||
self.master.view.toggle_marked()
|
||||
elif key == "n":
|
||||
signals.status_prompt_onekey.send(
|
||||
prompt = "Method",
|
||||
|
@ -263,8 +263,12 @@ class StatusBar(urwid.WidgetWrap):
|
||||
else:
|
||||
arrow = common.SYMBOL_DOWN
|
||||
|
||||
marked = ""
|
||||
if self.master.view.show_marked:
|
||||
marked = "M"
|
||||
|
||||
t = [
|
||||
('heading', ("%s [%s/%s]" % (arrow, offset, fc)).ljust(11)),
|
||||
('heading', ("%s %s [%s/%s]" % (arrow, marked, offset, fc)).ljust(11)),
|
||||
]
|
||||
|
||||
if self.master.server.bound:
|
||||
|
@ -123,6 +123,11 @@ def test_filter():
|
||||
v.set_filter(None)
|
||||
|
||||
assert len(v) == 4
|
||||
v.toggle_marked()
|
||||
assert len(v) == 0
|
||||
v.toggle_marked()
|
||||
assert len(v) == 4
|
||||
|
||||
v[1].marked = True
|
||||
v.toggle_marked()
|
||||
assert len(v) == 1
|
||||
|
Loading…
Reference in New Issue
Block a user