add logic, not working tho
This commit is contained in:
@@ -48,11 +48,14 @@ pub async fn run_ui() -> Result<()> {
|
||||
mpsc::channel::<RegisterResult>(1);
|
||||
let (save_table_result_sender, mut save_table_result_receiver) =
|
||||
mpsc::channel::<Result<String>>(1);
|
||||
let (save_logic_result_sender, mut save_logic_result_receiver) =
|
||||
mpsc::channel::<Result<String>>(1);
|
||||
|
||||
let mut event_handler = EventHandler::new(
|
||||
login_result_sender.clone(),
|
||||
register_result_sender.clone(),
|
||||
save_table_result_sender.clone(),
|
||||
save_logic_result_sender.clone(),
|
||||
).await.context("Failed to create event handler")?;
|
||||
let event_reader = EventReader::new();
|
||||
|
||||
@@ -88,6 +91,7 @@ pub async fn run_ui() -> Result<()> {
|
||||
app_state.ui.show_register = false;
|
||||
app_state.ui.show_admin = false;
|
||||
app_state.ui.show_add_table = false;
|
||||
app_state.ui.show_add_logic = false;
|
||||
app_state.ui.show_form = false;
|
||||
match active_view {
|
||||
AppView::Intro => app_state.ui.show_intro = true,
|
||||
@@ -111,6 +115,7 @@ pub async fn run_ui() -> Result<()> {
|
||||
admin_state.set_profiles(profile_names);
|
||||
}
|
||||
AppView::AddTable => app_state.ui.show_add_table = true,
|
||||
AppView::AddLogic => app_state.ui.show_add_logic = true,
|
||||
AppView::Form(_) => app_state.ui.show_form = true,
|
||||
AppView::Scratch => {} // Or show a scratchpad component
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user