[Add] Terms UI, [WIP] Main UI

This commit is contained in:
Alex Emmet 2026-02-18 19:11:43 +01:00
commit bac1c608fe
13 changed files with 450 additions and 112 deletions

View file

@ -1,5 +1,5 @@
use crate::ACTIVE_TASKS;
use crate::gui::ui::UI;
use crate::gui::ui::{UI, UNIQUE};
use crate::{RELOAD, SHUTDOWN};
use crossterm::event::{Event, KeyCode, KeyEvent, KeyEventKind, KeyModifiers, poll, read};
use std::sync::Arc;
@ -31,8 +31,9 @@ pub fn setup_input_handler(ui: Arc<UI>) {
Ok(event) => {
if let Event::Key(key_event) = event {
if key_event.kind == KeyEventKind::Press {
let ui_clone = ui.clone();
handle_input(key_event, ui_clone).await;
let uic = ui.clone();
handle_input(key_event, uic).await;
*UNIQUE.write().await = true;
}
}
}