moving state out of ui
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
pub mod ui;
|
pub mod ui;
|
||||||
pub mod tui;
|
pub mod tui;
|
||||||
pub mod config;
|
pub mod config;
|
||||||
|
pub mod state;
|
||||||
pub mod components1;
|
pub mod components1;
|
||||||
|
|
||||||
pub use ui::run_ui;
|
pub use ui::run_ui;
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
// src/client/mod.rs
|
|
||||||
mod ui;
|
|
||||||
mod colors;
|
|
||||||
mod components1;
|
|
||||||
mod terminal;
|
|
||||||
mod config;
|
|
||||||
|
|
||||||
pub use config::Config;
|
|
||||||
pub use ui::run_ui;
|
|
||||||
2
client/src/state/mod.rs
Normal file
2
client/src/state/mod.rs
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
// src/state/mod.rs
|
||||||
|
pub mod state;
|
||||||
@@ -4,6 +4,5 @@ pub mod ui;
|
|||||||
pub mod form;
|
pub mod form;
|
||||||
pub mod event;
|
pub mod event;
|
||||||
pub mod render;
|
pub mod render;
|
||||||
pub mod state;
|
|
||||||
|
|
||||||
pub use ui::run_ui;
|
pub use ui::run_ui;
|
||||||
|
|||||||
@@ -3,7 +3,9 @@
|
|||||||
use crate::tui::terminal::AppTerminal;
|
use crate::tui::terminal::AppTerminal;
|
||||||
use crate::config::colors::Theme;
|
use crate::config::colors::Theme;
|
||||||
use crate::config::config::Config;
|
use crate::config::config::Config;
|
||||||
use crate::ui::handlers::{event::EventHandler, form::FormState, state::AppState, render::render_ui};
|
use crate::ui::handlers::{event::EventHandler, form::FormState, render::render_ui};
|
||||||
|
use crate::state::state::AppState;
|
||||||
|
|
||||||
|
|
||||||
pub async fn run_ui() -> Result<(), Box<dyn std::error::Error>> {
|
pub async fn run_ui() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
let config = Config::load()?;
|
let config = Config::load()?;
|
||||||
|
|||||||
Reference in New Issue
Block a user