mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
wip: refactor pt.8, 512 errors lol
This commit is contained in:
parent
a1818a8504
commit
a784f7a6f2
19 changed files with 238 additions and 183 deletions
|
|
@ -1,15 +1,15 @@
|
|||
use crate::*;
|
||||
#[derive(Copy, Clone, PartialEq)]
|
||||
pub enum TransportAppCommand {
|
||||
pub enum TransportViewCommand {
|
||||
Focus(FocusCommand),
|
||||
Transport(TransportCommand),
|
||||
}
|
||||
impl Handle<Tui> for TransportView<Tui> {
|
||||
fn handle (&mut self, from: &TuiInput) -> Perhaps<bool> {
|
||||
TransportAppCommand::execute_with_state(self, from)
|
||||
TransportViewCommand::execute_with_state(self, from)
|
||||
}
|
||||
}
|
||||
impl InputToCommand<Tui, TransportView<Tui>> for TransportAppCommand {
|
||||
impl InputToCommand<Tui, TransportView<Tui>> for TransportViewCommand {
|
||||
fn input_to_command (_: &TransportView<Tui>, input: &TuiInput) -> Option<Self> {
|
||||
match input.event() {
|
||||
key!(KeyCode::Char(' ')) => Some(Self::FocusPrev),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue