project redesign
This commit is contained in:
4
client/src/modes/canvas.rs
Normal file
4
client/src/modes/canvas.rs
Normal file
@@ -0,0 +1,4 @@
|
||||
// src/client/modes/canvas.rs
|
||||
pub mod edit;
|
||||
pub mod common;
|
||||
pub mod read_only;
|
||||
@@ -1,4 +1,4 @@
|
||||
// src/modes/handlers/common.rs
|
||||
// src/modes/canvas/common.rs
|
||||
|
||||
use crate::tui::terminal::grpc_client::GrpcClient;
|
||||
use crate::ui::handlers::form::FormState;
|
||||
@@ -1,4 +1,4 @@
|
||||
// src/modes/handlers/edit.rs
|
||||
// src/modes/canvas/edit.rs
|
||||
|
||||
use crossterm::event::{KeyEvent, KeyCode, KeyModifiers};
|
||||
use crate::tui::terminal::{
|
||||
@@ -6,7 +6,7 @@ use crate::tui::terminal::{
|
||||
};
|
||||
use crate::config::binds::config::Config;
|
||||
use crate::ui::handlers::form::FormState;
|
||||
use super::common;
|
||||
use crate::modes::canvas::common;
|
||||
|
||||
pub async fn handle_edit_event_internal(
|
||||
key: KeyEvent,
|
||||
@@ -1,6 +1,3 @@
|
||||
// src/client/modes/handlers.rs
|
||||
pub mod event;
|
||||
pub mod edit;
|
||||
pub mod common;
|
||||
pub mod command_mode;
|
||||
pub mod read_only;
|
||||
|
||||
@@ -4,7 +4,9 @@ use crossterm::event::{KeyEvent, KeyCode, KeyModifiers};
|
||||
use crate::tui::terminal::grpc_client::GrpcClient;
|
||||
use crate::config::binds::config::Config;
|
||||
use crate::ui::handlers::form::FormState;
|
||||
use super::common;
|
||||
use crate::modes::{
|
||||
canvas::{common},
|
||||
};
|
||||
|
||||
pub async fn handle_command_event(
|
||||
key: KeyEvent,
|
||||
|
||||
@@ -9,9 +9,11 @@ use crate::tui::terminal::{
|
||||
use crate::config::binds::config::Config;
|
||||
use crate::ui::handlers::form::FormState;
|
||||
use crate::ui::handlers::rat_state::UiStateHandler;
|
||||
use crate::modes::handlers::{edit, command_mode, read_only};
|
||||
use crate::modes::{
|
||||
handlers::{command_mode},
|
||||
canvas::{edit, read_only, common},
|
||||
};
|
||||
use crate::config::binds::key_sequences::KeySequenceTracker;
|
||||
use super::common;
|
||||
|
||||
pub struct EventHandler {
|
||||
pub command_mode: bool,
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// src/client/modes/mod.rs
|
||||
pub mod handlers;
|
||||
pub mod canvas;
|
||||
|
||||
pub use handlers::*;
|
||||
pub use canvas::*;
|
||||
|
||||
Reference in New Issue
Block a user