working perfectly well right now
This commit is contained in:
@@ -26,7 +26,7 @@ pub fn render_ui(
|
||||
command_mode: bool,
|
||||
command_message: &str,
|
||||
app_state: &AppState,
|
||||
intro_state: &intro::IntroState,
|
||||
// intro_state parameter removed
|
||||
) {
|
||||
render_background(f, f.area(), theme);
|
||||
|
||||
@@ -41,10 +41,9 @@ pub fn render_ui(
|
||||
|
||||
let main_content_area = root[0];
|
||||
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 {
|
||||
// Create temporary AdminPanelState for rendering
|
||||
|
||||
// Create temporary AdminPanelState for rendering
|
||||
let mut admin_state = AdminPanelState::new(
|
||||
app_state.profile_tree.profiles
|
||||
@@ -66,7 +65,7 @@ pub fn render_ui(
|
||||
f,
|
||||
main_content_area,
|
||||
theme,
|
||||
&app_state.profile_tree,
|
||||
&app_state.profile_tree,
|
||||
&app_state.selected_profile,
|
||||
);
|
||||
} else if app_state.ui.show_form {
|
||||
@@ -77,10 +76,10 @@ pub fn render_ui(
|
||||
|
||||
if let Some(sidebar_rect) = sidebar_area {
|
||||
sidebar::render_sidebar(
|
||||
f,
|
||||
sidebar_rect,
|
||||
theme,
|
||||
&app_state.profile_tree,
|
||||
f,
|
||||
sidebar_rect,
|
||||
theme,
|
||||
&app_state.profile_tree,
|
||||
&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_message,
|
||||
&app_state,
|
||||
&intro_state,
|
||||
);
|
||||
})?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user