use super::super::*;
impl App {
pub(in crate::lookout::app) fn on_close_dialog_key(&mut self, key: KeyPress) -> Effect {
match key {
KeyPress::Quit => Effect::Quit,
KeyPress::Action(verb @ (ActionVerb::Reload | ActionVerb::Restart)) => {
self.answer_close(Some(verb))
}
KeyPress::Continue => self.answer_close(None),
KeyPress::Escape => {
self.close_dialog = None;
Effect::None
}
KeyPress::Action(ActionVerb::Stop)
| KeyPress::SelectUp
| KeyPress::SelectDown
| KeyPress::SelectFirst
| KeyPress::SelectLast
| KeyPress::Refresh
| KeyPress::Confirm
| KeyPress::Edit
| KeyPress::Cycle
| KeyPress::Help
| KeyPress::Settings
| KeyPress::FilterStart
| KeyPress::TextChar(_)
| KeyPress::TextBackspace
| KeyPress::TextEdit(_)
| KeyPress::TextApply
| KeyPress::TextAbandon
| KeyPress::Remove
| KeyPress::StepUp
| KeyPress::StepDown
| KeyPress::FoldView
| KeyPress::Secrets
| KeyPress::Reveal
| KeyPress::Copy
| KeyPress::TabPrev
| KeyPress::TabNext
| KeyPress::SecretDelete
| KeyPress::Collapse => Effect::None,
KeyPress::StreamCycle
| KeyPress::LevelCycle
| KeyPress::PageDown
| KeyPress::PageUp
| KeyPress::FollowToggle
| KeyPress::WrapToggle
| KeyPress::MatchNext
| KeyPress::MatchPrev
| KeyPress::Bleats
| KeyPress::NextGroup
| KeyPress::PrevGroup
| KeyPress::Group(_)
| KeyPress::Undo => Effect::None,
}
}
}