split config in modes/canvas is fixed and working properly well
This commit is contained in:
@@ -4,9 +4,8 @@
|
||||
use crossterm::event::{KeyEvent, KeyCode, KeyModifiers};
|
||||
use crate::config::binds::config::Config;
|
||||
use crate::state::pages::form::FormState;
|
||||
use crate::tui::functions::common::form::{save, revert};
|
||||
use crate::services::grpc_client::GrpcClient;
|
||||
|
||||
use crate::tui::functions::common::form::{save, revert};
|
||||
|
||||
pub async fn handle_edit_event_internal(
|
||||
key: KeyEvent,
|
||||
@@ -68,7 +67,7 @@ async fn execute_common_action(
|
||||
) -> Result<String, Box<dyn std::error::Error>> {
|
||||
match action {
|
||||
"save" => {
|
||||
common::save(
|
||||
save(
|
||||
form_state,
|
||||
grpc_client,
|
||||
is_saved,
|
||||
@@ -77,7 +76,7 @@ async fn execute_common_action(
|
||||
).await
|
||||
},
|
||||
"revert" => {
|
||||
common::revert(
|
||||
revert(
|
||||
form_state,
|
||||
grpc_client,
|
||||
current_position,
|
||||
@@ -178,7 +177,7 @@ async fn execute_edit_action(
|
||||
) -> Result<String, Box<dyn std::error::Error>> {
|
||||
match action {
|
||||
"save" => {
|
||||
common::save(
|
||||
save(
|
||||
form_state,
|
||||
grpc_client, // Changed from AppTerminal
|
||||
is_saved,
|
||||
|
||||
@@ -6,9 +6,7 @@ use crate::services::grpc_client::GrpcClient;
|
||||
use crate::state::pages::form::FormState;
|
||||
use crate::tui::functions::common::commands::CommandHandler;
|
||||
use crate::tui::terminal::core::TerminalCore;
|
||||
use crate::modes::{
|
||||
canvas::{common},
|
||||
};
|
||||
use crate::tui::functions::common::form::{save, revert};
|
||||
|
||||
pub async fn handle_command_event(
|
||||
key: KeyEvent,
|
||||
@@ -97,7 +95,7 @@ async fn process_command(
|
||||
Ok((should_exit, message, true))
|
||||
},
|
||||
"save" => {
|
||||
let message = common::save(
|
||||
let message = save(
|
||||
form_state,
|
||||
grpc_client,
|
||||
&mut command_handler.is_saved,
|
||||
@@ -108,7 +106,7 @@ async fn process_command(
|
||||
return Ok((false, message, true));
|
||||
},
|
||||
"revert" => {
|
||||
let message = common::revert(
|
||||
let message = revert(
|
||||
form_state,
|
||||
grpc_client,
|
||||
current_position,
|
||||
|
||||
Reference in New Issue
Block a user