Add help menu

This commit is contained in:
Dheepak Krishnamurthy 2020-07-29 09:08:07 -06:00
parent aa2571f726
commit 98c1a7395d
2 changed files with 58 additions and 3 deletions

View file

@ -76,11 +76,20 @@ fn main() -> Result<(), Box<dyn Error>> {
Key::Char('a') => {
app.mode = AppMode::AddTask;
}
Key::Char('?') => {
app.mode = AppMode::HelpPopup;
}
Key::Char('/') => {
app.mode = AppMode::Filter;
}
_ => {}
},
AppMode::HelpPopup => match input {
Key::Esc => {
app.mode = AppMode::Report;
}
_ => {}
}
AppMode::ModifyTask => match input {
Key::Char('\n') => {
app.task_modify();