pp/src/tui/mode_adding.rs
Trevor Merritt 9ff76954e0 BUGFIX: removes extra quotes from log entry time entries
FEATURE: Allows delete of target

UPDATE: UI Uses more popups to make the UI more 'layered'
2025-04-30 16:08:56 -04:00

34 lines
1.0 KiB
Rust

use std::time::Duration;
use ratatui::Frame;
use crate::tui::ratatui_app::RatatuiApp;
use color_eyre::Result;
use crossterm::event;
use crossterm::event::{Event, KeyCode, KeyEventKind};
use ratatui::widgets::{Block, Paragraph};
use crate::tui::ratatui_screens::RatatuiScreens::Monitoring;
pub struct RatatuiAddingMode {}
impl RatatuiAddingMode {
pub fn render(frame: &mut Frame, state: &mut RatatuiApp) {
frame.render_widget(
Paragraph::new("Not Yet Written.")
.block(Block::bordered())
.centered(),
frame.area()
);
}
pub fn handle_crossterm_events(app: &mut RatatuiApp) -> Result<()> {
if event::poll(Duration::from_millis(100))? {
match event::read()? {
Event::Key(key) if key.kind == KeyEventKind::Press => match key.code {
KeyCode::Esc => app.set_screen(Monitoring),
_ => {}
}
_ => {}
}
}
Ok(())
}
}