the search tui is not working yet
This commit is contained in:
@@ -4,7 +4,7 @@ use crate::components::{
|
||||
admin::add_logic::render_add_logic,
|
||||
admin::render_add_table,
|
||||
auth::{login::render_login, register::render_register},
|
||||
common::dialog::render_dialog, // Make sure this is imported
|
||||
common::dialog::render_dialog,
|
||||
common::find_file_palette,
|
||||
common::search_palette::render_search_palette,
|
||||
form::form::render_form,
|
||||
@@ -17,6 +17,7 @@ use crate::components::{
|
||||
};
|
||||
use crate::config::colors::themes::Theme;
|
||||
use crate::modes::general::command_navigation::NavigationState;
|
||||
use crate::state::pages::canvas_state::CanvasState;
|
||||
use crate::state::app::buffer::BufferState;
|
||||
use crate::state::app::highlight::HighlightState;
|
||||
use crate::state::app::state::AppState;
|
||||
@@ -24,7 +25,6 @@ use crate::state::pages::admin::AdminState;
|
||||
use crate::state::pages::auth::AuthState;
|
||||
use crate::state::pages::auth::LoginState;
|
||||
use crate::state::pages::auth::RegisterState;
|
||||
use crate::state::pages::canvas_state::CanvasState;
|
||||
use crate::state::pages::form::FormState;
|
||||
use crate::state::pages::intro::IntroState;
|
||||
use ratatui::{
|
||||
@@ -189,17 +189,13 @@ pub fn render_ui(
|
||||
.split(form_actual_area)[1]
|
||||
};
|
||||
|
||||
// --- FIX START ---
|
||||
// The call to `form_state.render` is now separate from the popup rendering.
|
||||
form_state.render(
|
||||
f,
|
||||
form_render_area,
|
||||
theme,
|
||||
is_event_handler_edit_mode,
|
||||
highlight_state,
|
||||
app_state,
|
||||
);
|
||||
// --- FIX END ---
|
||||
}
|
||||
|
||||
if let Some(area) = buffer_list_area {
|
||||
@@ -236,8 +232,7 @@ pub fn render_ui(
|
||||
}
|
||||
}
|
||||
|
||||
// --- FIX START ---
|
||||
// This block now handles drawing popups over any view. This is the correct place for it.
|
||||
// This block now correctly handles drawing popups over any view.
|
||||
if app_state.ui.show_search_palette {
|
||||
if let Some(search_state) = &app_state.search_state {
|
||||
render_search_palette(f, f.area(), theme, search_state);
|
||||
@@ -254,5 +249,4 @@ pub fn render_ui(
|
||||
app_state.ui.dialog.is_loading,
|
||||
);
|
||||
}
|
||||
// --- FIX END ---
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user