remove listen address from a default flow, navigation through hotkey

Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
Uncle Stretch 2025-02-18 17:17:27 +03:00
parent 2635792dab
commit e16d319b72
Signed by: str3tch
GPG Key ID: 84F3190747EE79AA
2 changed files with 11 additions and 4 deletions

View File

@ -2,7 +2,7 @@
name = "ghost-eye"
authors = ["str3tch <stretch@ghostchain.io>"]
description = "Application for interacting with Casper/Ghost nodes that are exposing RPC only to the localhost"
version = "0.3.38"
version = "0.3.39"
edition = "2021"
[dependencies]

View File

@ -116,15 +116,15 @@ impl Validator {
CurrentTab::Peers => self.current_tab = CurrentTab::Withdrawals,
CurrentTab::Withdrawals => self.current_tab = CurrentTab::History,
CurrentTab::History => self.current_tab = CurrentTab::NominatorsByValidator,
CurrentTab::NominatorsByValidator => self.current_tab = CurrentTab::ListenAddresses,
CurrentTab::ListenAddresses => self.current_tab = CurrentTab::NominatorsByValidator,
_ => {}
}
}
fn move_right(&mut self) {
match self.current_tab {
CurrentTab::Nothing => self.current_tab = CurrentTab::ListenAddresses,
CurrentTab::ListenAddresses => self.current_tab = CurrentTab::NominatorsByValidator,
CurrentTab::Nothing => self.current_tab = CurrentTab::NominatorsByValidator,
CurrentTab::NominatorsByValidator => self.current_tab = CurrentTab::History,
CurrentTab::History => self.current_tab = CurrentTab::Withdrawals,
CurrentTab::Withdrawals => self.current_tab = CurrentTab::Peers,
@ -250,6 +250,13 @@ impl Component for Validator {
component.set_active(self.current_tab.clone());
}
},
KeyCode::Char('L') => {
self.previous_tab = self.current_tab;
self.current_tab = CurrentTab::ListenAddresses;
for component in self.components.iter_mut() {
component.set_active(self.current_tab.clone());
}
},
_ => {
for component in self.components.iter_mut() {
component.handle_key_event(key)?;
@ -264,7 +271,7 @@ impl Component for Validator {
match action {
Action::SetActiveScreen(Mode::Validator) => {
self.is_active = true;
self.current_tab = CurrentTab::ListenAddresses;
self.current_tab = CurrentTab::NominatorsByValidator;
}
Action::PayoutValidatorPopup(_, _) => {
self.previous_tab = self.current_tab;