working perfectly well right now
This commit is contained in:
@@ -26,7 +26,7 @@ pub fn render_ui(
|
|||||||
command_mode: bool,
|
command_mode: bool,
|
||||||
command_message: &str,
|
command_message: &str,
|
||||||
app_state: &AppState,
|
app_state: &AppState,
|
||||||
intro_state: &intro::IntroState,
|
// intro_state parameter removed
|
||||||
) {
|
) {
|
||||||
render_background(f, f.area(), theme);
|
render_background(f, f.area(), theme);
|
||||||
|
|
||||||
@@ -41,10 +41,9 @@ pub fn render_ui(
|
|||||||
|
|
||||||
let main_content_area = root[0];
|
let main_content_area = root[0];
|
||||||
if app_state.ui.show_intro {
|
if app_state.ui.show_intro {
|
||||||
intro_state.render(f, main_content_area, theme);
|
// Use app_state's intro_state directly
|
||||||
|
app_state.ui.intro_state.render(f, main_content_area, theme);
|
||||||
} else if app_state.ui.show_admin {
|
} else if app_state.ui.show_admin {
|
||||||
// Create temporary AdminPanelState for rendering
|
|
||||||
|
|
||||||
// Create temporary AdminPanelState for rendering
|
// Create temporary AdminPanelState for rendering
|
||||||
let mut admin_state = AdminPanelState::new(
|
let mut admin_state = AdminPanelState::new(
|
||||||
app_state.profile_tree.profiles
|
app_state.profile_tree.profiles
|
||||||
@@ -66,7 +65,7 @@ pub fn render_ui(
|
|||||||
f,
|
f,
|
||||||
main_content_area,
|
main_content_area,
|
||||||
theme,
|
theme,
|
||||||
&app_state.profile_tree,
|
&app_state.profile_tree,
|
||||||
&app_state.selected_profile,
|
&app_state.selected_profile,
|
||||||
);
|
);
|
||||||
} else if app_state.ui.show_form {
|
} else if app_state.ui.show_form {
|
||||||
@@ -77,10 +76,10 @@ pub fn render_ui(
|
|||||||
|
|
||||||
if let Some(sidebar_rect) = sidebar_area {
|
if let Some(sidebar_rect) = sidebar_area {
|
||||||
sidebar::render_sidebar(
|
sidebar::render_sidebar(
|
||||||
f,
|
f,
|
||||||
sidebar_rect,
|
sidebar_rect,
|
||||||
theme,
|
theme,
|
||||||
&app_state.profile_tree,
|
&app_state.profile_tree,
|
||||||
&app_state.selected_profile
|
&app_state.selected_profile
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ pub async fn run_ui() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
event_handler.command_mode,
|
event_handler.command_mode,
|
||||||
&event_handler.command_message,
|
&event_handler.command_message,
|
||||||
&app_state,
|
&app_state,
|
||||||
&intro_state,
|
|
||||||
);
|
);
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user