diff --git a/client/src/state/state.rs b/client/src/state/state.rs index eb74fd7..8645b6b 100644 --- a/client/src/state/state.rs +++ b/client/src/state/state.rs @@ -8,6 +8,7 @@ pub struct UiState { pub is_saved: bool, pub show_intro: bool, pub show_admin: bool, + pub show_form: bool, } pub struct GeneralState { @@ -64,6 +65,7 @@ impl Default for UiState { is_saved: false, show_intro: true, show_admin: false, + show_form: false, } } } diff --git a/client/src/ui/handlers/render.rs b/client/src/ui/handlers/render.rs index 2ce2100..58a95af 100644 --- a/client/src/ui/handlers/render.rs +++ b/client/src/ui/handlers/render.rs @@ -68,7 +68,7 @@ pub fn render_ui( &app_state.profile_tree, &app_state.selected_profile, ); - } else { + } else if app_state.ui.show_form { let (sidebar_area, form_area) = calculate_sidebar_layout( app_state.ui.show_sidebar, main_content_area @@ -80,7 +80,7 @@ pub fn render_ui( sidebar_rect, theme, &app_state.profile_tree, - &app_state.selected_profile // Remove trailing comma + &app_state.selected_profile ); } @@ -124,6 +124,8 @@ pub fn render_ui( total_count, current_position, ); + } else{ + } render_status_line(f, root[1], current_dir, theme, is_edit_mode);