(&mut self, key: KeyEvent)
| 1351 | } |
| 1352 | |
| 1353 | fn handle_sandboxes_key(&mut self, key: KeyEvent) { |
| 1354 | match key.code { |
| 1355 | KeyCode::Char('q') => self.running = false, |
| 1356 | KeyCode::Tab => self.focus = Focus::Gateways, |
| 1357 | KeyCode::BackTab => self.focus = Focus::Providers, |
| 1358 | KeyCode::Char(':') => { |
| 1359 | self.input_mode = InputMode::Command; |
| 1360 | self.command_input.clear(); |
| 1361 | } |
| 1362 | KeyCode::Char('j') | KeyCode::Down if self.sandbox_count > 0 => { |
| 1363 | self.sandbox_selected = (self.sandbox_selected + 1).min(self.sandbox_count - 1); |
| 1364 | } |
| 1365 | KeyCode::Char('k') | KeyCode::Up => { |
| 1366 | self.sandbox_selected = self.sandbox_selected.saturating_sub(1); |
| 1367 | } |
| 1368 | KeyCode::Char('c') => { |
| 1369 | self.open_create_form(); |
| 1370 | } |
| 1371 | KeyCode::Enter if self.sandbox_count > 0 => { |
| 1372 | self.screen = Screen::Sandbox; |
| 1373 | self.focus = Focus::SandboxPolicy; |
| 1374 | self.confirm_delete = false; |
| 1375 | self.pending_sandbox_detail = true; |
| 1376 | } |
| 1377 | KeyCode::Esc => { |
| 1378 | self.focus = Focus::Providers; |
| 1379 | } |
| 1380 | _ => {} |
| 1381 | } |
| 1382 | } |
| 1383 | |
| 1384 | fn handle_policy_key(&mut self, key: KeyEvent) { |
| 1385 | if self.confirm_delete { |
no test coverage detected