Radish alpha
r
Radicle terminal user interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
patch-select: Fix operations
Erik Kundt committed 2 years ago
commit 162c2138a01ae6e3a86d4b0c40bafbb13893b27e
parent 6f2d0a297fb59a3573855ba510cd8e8713f6dd42
3 files changed +4 -9
modified bin/commands/patch/select.rs
@@ -66,7 +66,6 @@ pub enum Subject {
#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
pub enum PatchOperation {
    Show,
-
    Update,
    Checkout,
    Review,
    Delete,
@@ -80,9 +79,6 @@ impl Display for PatchOperation {
            PatchOperation::Show => {
                write!(f, "show")
            }
-
            PatchOperation::Update => {
-
                write!(f, "update")
-
            }
            PatchOperation::Checkout => {
                write!(f, "checkout")
            }
modified bin/commands/patch/select/event.rs
@@ -112,17 +112,17 @@ impl tuirealm::Component<Message, NoUserEvent> for Widget<OperationSelect> {
                Message::Quit(Some(output))
            }),
            Event::Keyboard(KeyEvent {
-
                code: Key::Char('u'),
+
                code: Key::Char('c'),
                ..
            }) => submit().map(|id| {
-
                let output = Output::new(Some(PatchOperation::Update), PatchId::from(id));
+
                let output = Output::new(Some(PatchOperation::Checkout), PatchId::from(id));
                Message::Quit(Some(output))
            }),
            Event::Keyboard(KeyEvent {
-
                code: Key::Char('c'),
+
                code: Key::Char('r'),
                ..
            }) => submit().map(|id| {
-
                let output = Output::new(Some(PatchOperation::Checkout), PatchId::from(id));
+
                let output = Output::new(Some(PatchOperation::Review), PatchId::from(id));
                Message::Quit(Some(output))
            }),
            Event::Keyboard(KeyEvent {
modified bin/commands/patch/select/ui.rs
@@ -92,7 +92,6 @@ impl OperationSelect {
                vec![
                    tui::ui::shortcut(&self.theme, "↑/↓", "navigate"),
                    tui::ui::shortcut(&self.theme, "enter", "show"),
-
                    tui::ui::shortcut(&self.theme, "u", "update"),
                    tui::ui::shortcut(&self.theme, "c", "checkout"),
                    tui::ui::shortcut(&self.theme, "r", "review"),
                    tui::ui::shortcut(&self.theme, "d", "delete"),