fix ip regex, add write to sh file
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user