feat: add more interaction

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2024-05-09 15:26:58 +02:00
parent 3e647229b2
commit 9ceaa4cd38
6 changed files with 117 additions and 222 deletions

View File

@@ -74,6 +74,7 @@ fn update(
if let Event::Key(key) = event::read().context("event read failed")? {
let mut cmd = match &app.mode {
app::Mode::View => match key.code {
KeyCode::Enter => app.update(Msg::Interact)?,
KeyCode::Char('q') => return Ok(UpdateConclusion::new(true)),
KeyCode::Char('l') => app.update(Msg::MoveRight)?,
KeyCode::Char('h') => app.update(Msg::MoveLeft)?,