From 8ea9965ee309d62b64dc9ee0a28dba34e3cdb1d9 Mon Sep 17 00:00:00 2001 From: filipriec Date: Wed, 16 Apr 2025 19:10:02 +0200 Subject: [PATCH] temp debug --- client/src/components/admin/admin_panel.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/client/src/components/admin/admin_panel.rs b/client/src/components/admin/admin_panel.rs index 16486fa..db82598 100644 --- a/client/src/components/admin/admin_panel.rs +++ b/client/src/components/admin/admin_panel.rs @@ -54,6 +54,17 @@ pub fn render_admin_panel( selected_profile, ); } else { + // --- Admin View: Render Debug Info in Top Area (chunks[0]) --- + let profile_idx_str = admin_state.profile_list_state.selected() + .map_or("P:N".to_string(), |i| format!("P:{}", i)); // P:Index or P:N + let table_idx_str = admin_state.table_list_state.selected() + .map_or("T:N".to_string(), |i| format!("T:{}", i)); // T:Index or T:N + let focus_str = format!("F:{:?}", admin_state.current_focus); // F:Profiles or F:Tables + + let debug_text = format!("{}|{}|{}", profile_idx_str, table_idx_str, focus_str); + let debug_paragraph = Paragraph::new(debug_text).alignment(Alignment::Left); + f.render_widget(debug_paragraph, chunks[0]); // Render in the top chunk + render_admin_panel_admin( f, chunks[1],