appstate for form
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user