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:
		
							parent
							
								
									4b68675ce5
								
							
						
					
					
						commit
						c6313ebf8c
					
				| @ -150,7 +150,8 @@ drawAccountsScreen AppState{aopts=UIOpts{cliopts_=CliOpts{reportopts_=ropts}} | |||||||
|         ,("C", "cleared?") |         ,("C", "cleared?") | ||||||
|         ,("U", "uncleared?") |         ,("U", "uncleared?") | ||||||
|         ,("R", "real?") |         ,("R", "real?") | ||||||
|         ,("f", "filter") |         ,("/", "filter") | ||||||
|  |         ,("DEL", "unfilter") | ||||||
|         ,("right/enter", "register") |         ,("right/enter", "register") | ||||||
|         ,("g", "reload") |         ,("g", "reload") | ||||||
|         ,("q", "quit") |         ,("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 'C') [] -> scrollTop >> (continue $ reload j d $ stToggleCleared st') | ||||||
|             Vty.EvKey (Vty.KChar 'U') [] -> scrollTop >> (continue $ reload j d $ stToggleUncleared 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 '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 (Vty.KLeft) []     -> continue $ popScreen st' | ||||||
|             Vty.EvKey (k) [] | k `elem` [Vty.KRight, Vty.KEnter] -> do |             Vty.EvKey (k) [] | k `elem` [Vty.KRight, Vty.KEnter] -> do | ||||||
|               let |               let | ||||||
|  | |||||||
| @ -179,7 +179,8 @@ drawRegisterScreen AppState{aopts=UIOpts{cliopts_=CliOpts{reportopts_=ropts}} | |||||||
|           ,("C", "cleared?") |           ,("C", "cleared?") | ||||||
|           ,("U", "uncleared?") |           ,("U", "uncleared?") | ||||||
|           ,("R", "real?") |           ,("R", "real?") | ||||||
|           ,("f", "filter") |           ,("/", "filter") | ||||||
|  |           ,("DEL", "unfilter") | ||||||
|           ,("right/enter", "transaction") |           ,("right/enter", "transaction") | ||||||
|           ,("g", "reload") |           ,("g", "reload") | ||||||
|           ,("q", "quit") |           ,("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 'C') [] -> scrollTop >> (continue $ reload j d $ stToggleCleared st) | ||||||
|         Vty.EvKey (Vty.KChar 'U') [] -> scrollTop >> (continue $ reload j d $ stToggleUncleared 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 '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 (Vty.KLeft)     [] -> continue $ popScreen st | ||||||
| 
 | 
 | ||||||
|         Vty.EvKey (k) [] | k `elem` [Vty.KRight, Vty.KEnter] -> do |         Vty.EvKey (k) [] | k `elem` [Vty.KRight, Vty.KEnter] -> do | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user