admin page being rendered properly well now

This commit is contained in:
filipriec
2025-08-30 13:32:45 +02:00
parent d6fd672409
commit 42db496ad7
2 changed files with 4 additions and 2 deletions

View File

@@ -43,6 +43,7 @@ pub fn render_ui(
current_dir: &str, current_dir: &str,
current_fps: f64, current_fps: f64,
app_state: &AppState, app_state: &AppState,
auth_state: &AuthState,
) { ) {
render_background(f, f.area(), theme); 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( Page::Admin(state) => crate::pages::admin::main::ui::render_admin_panel(
f, f,
app_state, app_state,
&mut AuthState::default(), auth_state,
state, state,
main_content_area, main_content_area,
theme, theme,

View File

@@ -411,7 +411,7 @@ pub async fn run_ui() -> Result<()> {
if let Page::Admin(current) = &router.current { if let Page::Admin(current) = &router.current {
admin_state = current.clone(); 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 { match grpc_client.get_profile_tree().await {
Ok(refreshed_tree) => { Ok(refreshed_tree) => {
app_state.profile_tree = refreshed_tree; app_state.profile_tree = refreshed_tree;
@@ -757,6 +757,7 @@ pub async fn run_ui() -> Result<()> {
&current_dir, &current_dir,
current_fps, current_fps,
&app_state, &app_state,
&auth_state,
); );
}) })
.context("Terminal draw call failed")?; .context("Terminal draw call failed")?;