fix ip regex, add write to sh file
Some checks failed
/ Quality Check (push) Failing after 2m36s
/ Build (push) Failing after 1m42s

This commit is contained in:
Phani Pavan K
2025-09-19 23:30:30 +05:30
parent 7ba256c96d
commit b334ffabac
3 changed files with 20 additions and 9 deletions

View File

@@ -71,9 +71,7 @@ fn runApp<B: Backend>(app: &mut AppState, terminal: &mut Terminal<B>) -> Result<
KeyCode::Char('q') | KeyCode::F(10) | KeyCode::Esc => {
app.screen = CurrentScreen::Exit
}
KeyCode::Char('s') | KeyCode::F(2) => app.screen = CurrentScreen::Settings,
_ => {}
},
CurrentScreen::Add => match (key.modifiers, key.code) {
@@ -113,7 +111,6 @@ fn runApp<B: Backend>(app: &mut AppState, terminal: &mut Terminal<B>) -> Result<
}
(KeyModifiers::NONE, KeyCode::Tab) => app.nextField(),
(KeyModifiers::SHIFT, KeyCode::Tab) => app.prevField(),
(_, KeyCode::Char(v)) => {
if let Some(e) = &app.currentlyEditing {
let mut isIP = false;
@@ -152,6 +149,7 @@ fn runApp<B: Backend>(app: &mut AppState, terminal: &mut Terminal<B>) -> Result<
CurrentScreen::Exit => match key.code {
KeyCode::Enter => {
app.save();
app.writeToConfig();
return Ok(true);
}
KeyCode::Esc | KeyCode::Char('m') => app.screen = CurrentScreen::Main,