working, split config where functions for each page are defined for this page, if the functions are not general for each page. Huge update, works for tui/functions/form and fui/functions/login. Working, time to move to other things

This commit is contained in:
filipriec
2025-03-30 15:46:49 +02:00
parent 13d4db6bdc
commit e36b1817bc
3 changed files with 61 additions and 29 deletions

View File

@@ -8,6 +8,7 @@ use crate::tui::terminal::{
use crate::tui::controls::commands::CommandHandler;
use crate::config::binds::config::Config;
use crate::state::pages::form::FormState;
use crate::state::pages::auth::AuthState;
use crate::ui::handlers::rat_state::UiStateHandler;
use crate::modes::{
common::{command_mode},
@@ -25,6 +26,7 @@ pub struct EventHandler {
pub edit_mode_cooldown: bool,
pub ideal_cursor_column: usize,
pub key_sequence_tracker: KeySequenceTracker,
pub auth_state: AuthState,
}
impl EventHandler {
@@ -37,6 +39,7 @@ impl EventHandler {
edit_mode_cooldown: false,
ideal_cursor_column: 0,
key_sequence_tracker: KeySequenceTracker::new(800),
auth_state: AuthState::new(),
}
}
@@ -145,6 +148,7 @@ impl EventHandler {
key,
config,
form_state,
&mut self.auth_state,
&mut self.key_sequence_tracker,
current_position,
total_count,