ui: use / to filter; backspace/delete clears it

I was planning to use this for search, but I can't help it, my hands
want to use / to adjust the filter.
This commit is contained in:
Simon Michael 2016-06-07 09:21:51 -07:00
parent 4b68675ce5
commit c6313ebf8c
2 changed files with 8 additions and 4 deletions

View File

@ -150,7 +150,8 @@ drawAccountsScreen AppState{aopts=UIOpts{cliopts_=CliOpts{reportopts_=ropts}}
,("C", "cleared?")
,("U", "uncleared?")
,("R", "real?")
,("f", "filter")
,("/", "filter")
,("DEL", "unfilter")
,("right/enter", "register")
,("g", "reload")
,("q", "quit")
@ -277,7 +278,8 @@ handleAccountsScreen st@AppState{
Vty.EvKey (Vty.KChar 'C') [] -> scrollTop >> (continue $ reload j d $ stToggleCleared st')
Vty.EvKey (Vty.KChar 'U') [] -> scrollTop >> (continue $ reload j d $ stToggleUncleared st')
Vty.EvKey (Vty.KChar 'R') [] -> scrollTop >> (continue $ reload j d $ stToggleReal st')
Vty.EvKey (Vty.KChar 'f') [] -> continue $ reload j d $ stShowMinibuffer st'
Vty.EvKey k [] | k `elem` [Vty.KChar '/'] -> continue $ reload j d $ stShowMinibuffer st'
Vty.EvKey k [] | k `elem` [Vty.KBS, Vty.KDel] -> (continue $ reload j d $ stResetFilter st')
Vty.EvKey (Vty.KLeft) [] -> continue $ popScreen st'
Vty.EvKey (k) [] | k `elem` [Vty.KRight, Vty.KEnter] -> do
let

View File

@ -179,7 +179,8 @@ drawRegisterScreen AppState{aopts=UIOpts{cliopts_=CliOpts{reportopts_=ropts}}
,("C", "cleared?")
,("U", "uncleared?")
,("R", "real?")
,("f", "filter")
,("/", "filter")
,("DEL", "unfilter")
,("right/enter", "transaction")
,("g", "reload")
,("q", "quit")
@ -238,7 +239,8 @@ handleRegisterScreen st@AppState{
Vty.EvKey (Vty.KChar 'C') [] -> scrollTop >> (continue $ reload j d $ stToggleCleared st)
Vty.EvKey (Vty.KChar 'U') [] -> scrollTop >> (continue $ reload j d $ stToggleUncleared st)
Vty.EvKey (Vty.KChar 'R') [] -> scrollTop >> (continue $ reload j d $ stToggleReal st)
Vty.EvKey (Vty.KChar 'f') [] -> (continue $ reload j d $ stShowMinibuffer st)
Vty.EvKey k [] | k `elem` [Vty.KChar '/'] -> (continue $ reload j d $ stShowMinibuffer st)
Vty.EvKey k [] | k `elem` [Vty.KBS, Vty.KDel] -> (continue $ reload j d $ stResetFilter st)
Vty.EvKey (Vty.KLeft) [] -> continue $ popScreen st
Vty.EvKey (k) [] | k `elem` [Vty.KRight, Vty.KEnter] -> do