client fixes
This commit is contained in:
@@ -7,24 +7,3 @@ pub mod components1;
|
||||
|
||||
pub use ui::run_ui;
|
||||
|
||||
use ratatui::{backend::CrosstermBackend, Terminal};
|
||||
use crossterm::event::{self, Event, KeyCode};
|
||||
|
||||
pub async fn run_ui() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let mut terminal = Terminal::new(CrosstermBackend::new(std::io::stdout()))?;
|
||||
|
||||
loop {
|
||||
terminal.draw(|f| {
|
||||
// Your UI rendering logic here
|
||||
ui::draw(f);
|
||||
})?;
|
||||
|
||||
if let Event::Key(key) = event::read()? {
|
||||
if key.code == KeyCode::Char('q') {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user