add Logic fully decoupled

This commit is contained in:
Priec
2025-08-31 21:37:18 +02:00
parent 5b42da8290
commit a5a8d98984
2 changed files with 2 additions and 10 deletions

View File

@@ -426,15 +426,9 @@ pub async fn run_ui() -> Result<()> {
}
AppView::AddTable => router.navigate(Page::AddTable(admin_state.add_table_state.clone())),
AppView::AddLogic => {
// Create once, like Login/Register
if let Page::AddLogic(_) = &router.current {
// already on page
} else {
let mut page = add_logic::state::AddLogicFormState::from_state(
admin_state.add_logic_state.clone(),
);
if let Page::AddLogic(page) = &mut router.current {
// Ensure keymap is set once
page.editor.set_keymap(config.build_canvas_keymap());
router.navigate(Page::AddLogic(page));
}
}
AppView::Form(path) => {