add logic is now using canvas library now

This commit is contained in:
filipriec
2025-08-30 21:10:10 +02:00
parent c7d524c76a
commit 4edec5e72d
9 changed files with 426 additions and 600 deletions

View File

@@ -425,7 +425,18 @@ pub async fn run_ui() -> Result<()> {
router.navigate(Page::Admin(admin_state.clone()));
}
AppView::AddTable => router.navigate(Page::AddTable(admin_state.add_table_state.clone())),
AppView::AddLogic => router.navigate(Page::AddLogic(admin_state.add_logic_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(),
);
page.editor.set_keymap(config.build_canvas_keymap());
router.navigate(Page::AddLogic(page));
}
}
AppView::Form(path) => {
// Keep current_view_* consistent with the active buffer path
if let Some((profile, table)) = path.split_once('/') {