CRUCIAL bug fixed in the admin panel non admin user
This commit is contained in:
@@ -72,7 +72,13 @@ pub async fn run_ui() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
AppView::Intro => app_state.ui.show_intro = true,
|
AppView::Intro => app_state.ui.show_intro = true,
|
||||||
AppView::Login => app_state.ui.show_login = true,
|
AppView::Login => app_state.ui.show_login = true,
|
||||||
AppView::Register => app_state.ui.show_register = 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::Form(_) => app_state.ui.show_form = true,
|
||||||
AppView::Scratch => {} // Or show a scratchpad component
|
AppView::Scratch => {} // Or show a scratchpad component
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user