From df305003a7b66f86c847a671eec98fff48452985 Mon Sep 17 00:00:00 2001 From: Roland Sherwin Date: Mon, 3 Jun 2024 19:04:15 +0530 Subject: [PATCH] fix(launchpad): pressing enter should start nodes --- node-launchpad/src/components/home.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/node-launchpad/src/components/home.rs b/node-launchpad/src/components/home.rs index 95dd82c861..a84d5af05e 100644 --- a/node-launchpad/src/components/home.rs +++ b/node-launchpad/src/components/home.rs @@ -226,6 +226,13 @@ impl Component for Home { }, Action::StoreNodesToStart(count) => { self.nodes_to_start = count; + if self.nodes_to_start == 0 { + info!("Nodes to start set to 0. Sending command to stop all nodes."); + return Ok(Some(Action::HomeActions(HomeActions::StopNodes))); + } else { + info!("Nodes to start set to: {count}. Sending command to start nodes"); + return Ok(Some(Action::HomeActions(HomeActions::StartNodes))); + } } Action::StoreDiscordUserName(username) => { let reset_safenode_services = (self.discord_username != username)