Add tabs to the cockpit
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Isaac Mills 2025-07-20 00:44:28 -06:00
parent 852fba7b05
commit 6cac22c9d8
Signed by: fnmain
GPG key ID: B67D7410F33A0F61
4 changed files with 73 additions and 7 deletions

View file

@ -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(),
_ => {}
}
}