appstate for form
This commit is contained in:
@@ -8,6 +8,7 @@ pub struct UiState {
|
|||||||
pub is_saved: bool,
|
pub is_saved: bool,
|
||||||
pub show_intro: bool,
|
pub show_intro: bool,
|
||||||
pub show_admin: bool,
|
pub show_admin: bool,
|
||||||
|
pub show_form: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct GeneralState {
|
pub struct GeneralState {
|
||||||
@@ -64,6 +65,7 @@ impl Default for UiState {
|
|||||||
is_saved: false,
|
is_saved: false,
|
||||||
show_intro: true,
|
show_intro: true,
|
||||||
show_admin: false,
|
show_admin: false,
|
||||||
|
show_form: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ pub fn render_ui(
|
|||||||
&app_state.profile_tree,
|
&app_state.profile_tree,
|
||||||
&app_state.selected_profile,
|
&app_state.selected_profile,
|
||||||
);
|
);
|
||||||
} else {
|
} else if app_state.ui.show_form {
|
||||||
let (sidebar_area, form_area) = calculate_sidebar_layout(
|
let (sidebar_area, form_area) = calculate_sidebar_layout(
|
||||||
app_state.ui.show_sidebar,
|
app_state.ui.show_sidebar,
|
||||||
main_content_area
|
main_content_area
|
||||||
@@ -80,7 +80,7 @@ pub fn render_ui(
|
|||||||
sidebar_rect,
|
sidebar_rect,
|
||||||
theme,
|
theme,
|
||||||
&app_state.profile_tree,
|
&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,
|
total_count,
|
||||||
current_position,
|
current_position,
|
||||||
);
|
);
|
||||||
|
} else{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render_status_line(f, root[1], current_dir, theme, is_edit_mode);
|
render_status_line(f, root[1], current_dir, theme, is_edit_mode);
|
||||||
|
|||||||
Reference in New Issue
Block a user