Add tabs to the cockpit
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
852fba7b05
commit
6cac22c9d8
4 changed files with 73 additions and 7 deletions
|
@ -5,7 +5,7 @@ use thecockpit::app::App;
|
|||
|
||||
fn main() {
|
||||
let mut terminal = ratatui::init();
|
||||
let mut app = App::default();
|
||||
let mut app = App::new();
|
||||
|
||||
loop {
|
||||
terminal.draw(|frame| app.draw(frame));
|
||||
|
@ -16,6 +16,14 @@ fn main() {
|
|||
code: event::KeyCode::Char('q'),
|
||||
..
|
||||
}) => break,
|
||||
event::Event::Key(event::KeyEvent {
|
||||
code: event::KeyCode::Left,
|
||||
..
|
||||
}) => app.prev_tab(),
|
||||
event::Event::Key(event::KeyEvent {
|
||||
code: event::KeyCode::Right,
|
||||
..
|
||||
}) => app.next_tab(),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue