Implement snowballing tab controls
This commit is contained in:
parent
8c11630801
commit
2e51ae8064
21
src/app.rs
21
src/app.rs
@ -262,10 +262,10 @@ impl App {
|
|||||||
) -> Result<(), SendError<Action>> {
|
) -> Result<(), SendError<Action>> {
|
||||||
match (self.state.current_tab, key) {
|
match (self.state.current_tab, key) {
|
||||||
(_, KeyCode::Esc) => {
|
(_, KeyCode::Esc) => {
|
||||||
self.action_tx.send(GlobalAction::Quit.into())?;
|
self.action_tx.send(GlobalAction::Quit.into())?
|
||||||
}
|
}
|
||||||
(_, KeyCode::Tab) => {
|
(_, KeyCode::Tab) => {
|
||||||
self.action_tx.send(GlobalAction::NextTab.into())?;
|
self.action_tx.send(GlobalAction::NextTab.into())?
|
||||||
}
|
}
|
||||||
(Tab::Seeding, KeyCode::Char(c)) => {
|
(Tab::Seeding, KeyCode::Char(c)) => {
|
||||||
self.action_tx.send(SeedingAction::EnterChar(c).into())?;
|
self.action_tx.send(SeedingAction::EnterChar(c).into())?;
|
||||||
@ -276,6 +276,23 @@ impl App {
|
|||||||
(Tab::Seeding, KeyCode::Enter) => {
|
(Tab::Seeding, KeyCode::Enter) => {
|
||||||
self.action_tx.send(GlobalAction::FetchPub.into())?;
|
self.action_tx.send(GlobalAction::FetchPub.into())?;
|
||||||
}
|
}
|
||||||
|
(Tab::Snowballing, KeyCode::Enter) => {
|
||||||
|
self.action_tx.send(SnowballingAction::Search.into())?;
|
||||||
|
}
|
||||||
|
(Tab::Snowballing, KeyCode::Char('h')) => {
|
||||||
|
self.action_tx
|
||||||
|
.send(SnowballingAction::SelectLeftPane.into())?;
|
||||||
|
}
|
||||||
|
(Tab::Snowballing, KeyCode::Char('l')) => {
|
||||||
|
self.action_tx
|
||||||
|
.send(SnowballingAction::SelectRightPane.into())?;
|
||||||
|
}
|
||||||
|
(Tab::Snowballing, KeyCode::Char('j')) => {
|
||||||
|
self.action_tx.send(SnowballingAction::NextItem.into())?;
|
||||||
|
}
|
||||||
|
(Tab::Snowballing, KeyCode::Char('k')) => {
|
||||||
|
self.action_tx.send(SnowballingAction::PrevItem.into())?;
|
||||||
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user