split temp client

This commit is contained in:
filipriec
2025-02-23 09:28:41 +01:00
parent 2c4b69d406
commit f83f401ff1
11 changed files with 49 additions and 11 deletions

30
client/src/lib.rs Normal file
View File

@@ -0,0 +1,30 @@
// client/src/lib.rs
pub mod config;
pub mod terminal;
pub mod ui;
pub mod colors;
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(())
}