admin panel compiled

This commit is contained in:
filipriec
2025-03-22 10:27:21 +01:00
parent c592dfc7f5
commit c198297a5c
5 changed files with 62 additions and 5 deletions

View File

@@ -9,7 +9,7 @@ use crate::config::config::Config;
use crate::ui::handlers::{form::FormState, render::render_ui};
use crate::modes::handlers::event::EventHandler;
use crate::state::state::AppState;
use crate::components::handlers::intro::IntroState;
use crate::components::handlers::{intro::IntroState, admin_panel::AdminPanelState};
pub async fn run_ui() -> Result<(), Box<dyn std::error::Error>> {
let config = Config::load()?;
@@ -18,6 +18,7 @@ pub async fn run_ui() -> Result<(), Box<dyn std::error::Error>> {
let mut command_handler = CommandHandler::new();
let theme = Theme::from_str(&config.colors.theme);
let mut intro_state = IntroState::new();
let admin_panel_state = AdminPanelState::new();
// Fetch table structure at startup (one-time)
// TODO: Later, consider implementing a live update for table structure changes.
@@ -65,6 +66,7 @@ pub async fn run_ui() -> Result<(), Box<dyn std::error::Error>> {
&event_handler.command_message,
&app_state,
&intro_state,
&admin_panel_state,
);
})?;