diff --git a/client/src/ui/handlers/ui.rs b/client/src/ui/handlers/ui.rs index b8a4dc0..af4280a 100644 --- a/client/src/ui/handlers/ui.rs +++ b/client/src/ui/handlers/ui.rs @@ -72,7 +72,13 @@ pub async fn run_ui() -> Result<(), Box> { AppView::Intro => app_state.ui.show_intro = true, AppView::Login => app_state.ui.show_login = true, AppView::Register => app_state.ui.show_register = true, - AppView::Admin => app_state.ui.show_admin = true, + AppView::Admin => { + app_state.ui.show_admin = true; + let profile_names = app_state.profile_tree.profiles.iter() + .map(|p| p.name.clone()) + .collect(); + admin_state.set_profiles(profile_names); + } AppView::Form(_) => app_state.ui.show_form = true, AppView::Scratch => {} // Or show a scratchpad component }