From 42db496ad78b519c73e1c53cc4279708dcf34edb Mon Sep 17 00:00:00 2001 From: filipriec Date: Sat, 30 Aug 2025 13:32:45 +0200 Subject: [PATCH] admin page being rendered properly well now --- client/src/ui/handlers/render.rs | 3 ++- client/src/ui/handlers/ui.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/ui/handlers/render.rs b/client/src/ui/handlers/render.rs index 3bff7cb..1d33d7e 100644 --- a/client/src/ui/handlers/render.rs +++ b/client/src/ui/handlers/render.rs @@ -43,6 +43,7 @@ pub fn render_ui( current_dir: &str, current_fps: f64, app_state: &AppState, + auth_state: &AuthState, ) { render_background(f, f.area(), theme); @@ -94,7 +95,7 @@ pub fn render_ui( Page::Admin(state) => crate::pages::admin::main::ui::render_admin_panel( f, app_state, - &mut AuthState::default(), + auth_state, state, main_content_area, theme, diff --git a/client/src/ui/handlers/ui.rs b/client/src/ui/handlers/ui.rs index 9225af9..244b0a6 100644 --- a/client/src/ui/handlers/ui.rs +++ b/client/src/ui/handlers/ui.rs @@ -411,7 +411,7 @@ pub async fn run_ui() -> Result<()> { if let Page::Admin(current) = &router.current { admin_state = current.clone(); } - info!("Active view is Admin, refreshing profile tree..."); + info!("Auth role at render: {:?}", auth_state.role); match grpc_client.get_profile_tree().await { Ok(refreshed_tree) => { app_state.profile_tree = refreshed_tree; @@ -757,6 +757,7 @@ pub async fn run_ui() -> Result<()> { ¤t_dir, current_fps, &app_state, + &auth_state, ); }) .context("Terminal draw call failed")?;