Skip to content

Commit

Permalink
fix(launchpad): pressing enter should start nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
RolandSherwin committed Jun 3, 2024
1 parent 1d555be commit df30500
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions node-launchpad/src/components/home.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit df30500

Please sign in to comment.