we compiled but buffer doesnt work

This commit is contained in:
filipriec
2025-08-29 18:11:27 +02:00
parent 58f109ca91
commit 16dd460469
13 changed files with 256 additions and 166 deletions

View File

@@ -22,6 +22,7 @@ use crate::buffer::state::BufferState;
use crate::state::app::state::AppState;
use crate::state::pages::auth::AuthState;
use crate::bottom_panel::layout::{bottom_panel_constraints, render_bottom_panel};
use canvas::FormEditor;
use ratatui::{
layout::{Constraint, Direction, Layout},
Frame,
@@ -114,7 +115,7 @@ pub fn render_ui(
app_state,
state,
),
Page::Form(state) => {
Page::Form(path) => {
let (sidebar_area, form_actual_area) =
calculate_sidebar_layout(app_state.ui.show_sidebar, main_content_area);
if let Some(sidebar_rect) = sidebar_area {
@@ -143,16 +144,24 @@ pub fn render_ui(
.split(form_actual_area)[1]
};
render_form_page(
f,
form_render_area,
app_state,
state,
app_state.current_view_table_name.as_deref().unwrap_or(""),
theme,
state.total_count,
state.current_position,
);
if let Some(editor) = app_state.editor_for_path_ref(path) {
let (total_count, current_position) =
if let Some(fs) = app_state.form_state_for_path_ref(path) {
(fs.total_count, fs.current_position)
} else {
(0, 1)
};
render_form_page(
f,
form_render_area,
editor,
app_state.current_view_table_name.as_deref().unwrap_or(""),
theme,
total_count,
current_position,
);
}
}
}
@@ -186,6 +195,7 @@ pub fn render_ui(
theme,
current_fps,
app_state,
router,
navigation_state,
event_handler_command_input,
event_handler_command_mode_active,