add Logic fully decoupled
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user