Categorize Auth activity msg

This commit is contained in:
veeso
2022-01-06 10:44:34 +01:00
committed by Christian Visintin
parent 4e802f1dc5
commit 84cb775679
6 changed files with 286 additions and 218 deletions
+7 -7
View File
@@ -25,7 +25,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
use super::{FileTransferProtocol, Msg};
use super::{FileTransferProtocol, FormMsg, Msg, UiMsg};
mod bookmarks;
mod form;
@@ -63,27 +63,27 @@ impl Component<Msg, NoUserEvent> for GlobalListener {
Event::Keyboard(KeyEvent {
code: Key::Esc | Key::Function(10),
..
}) => Some(Msg::ShowQuitPopup),
}) => Some(Msg::Ui(UiMsg::ShowQuitPopup)),
Event::Keyboard(KeyEvent {
code: Key::Char('c'),
modifiers: KeyModifiers::CONTROL,
}) => Some(Msg::EnterSetup),
}) => Some(Msg::Form(FormMsg::EnterSetup)),
Event::Keyboard(KeyEvent {
code: Key::Char('h'),
modifiers: KeyModifiers::CONTROL,
}) => Some(Msg::ShowKeybindingsPopup),
}) => Some(Msg::Ui(UiMsg::ShowKeybindingsPopup)),
Event::Keyboard(KeyEvent {
code: Key::Function(1),
..
}) => Some(Msg::ShowKeybindingsPopup),
}) => Some(Msg::Ui(UiMsg::ShowKeybindingsPopup)),
Event::Keyboard(KeyEvent {
code: Key::Char('r'),
modifiers: KeyModifiers::CONTROL,
}) => Some(Msg::ShowReleaseNotes),
}) => Some(Msg::Ui(UiMsg::ShowReleaseNotes)),
Event::Keyboard(KeyEvent {
code: Key::Char('s'),
modifiers: KeyModifiers::CONTROL,
}) => Some(Msg::ShowSaveBookmarkPopup),
}) => Some(Msg::Ui(UiMsg::ShowSaveBookmarkPopup)),
_ => None,
}
}