diff --git a/bin/commands/patch/common.rs b/bin/commands/patch/common.rs index 9b385314..3f06948d 100644 --- a/bin/commands/patch/common.rs +++ b/bin/commands/patch/common.rs @@ -17,30 +17,22 @@ pub enum Mode { /// selection widget. #[derive(Clone, Debug, Eq, PartialEq, Serialize)] pub enum PatchOperation { - Show, Checkout, - Delete, - Edit, - Comment, + Diff, + Show, } impl Display for PatchOperation { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - PatchOperation::Show => { - write!(f, "show") - } PatchOperation::Checkout => { write!(f, "checkout") } - PatchOperation::Delete => { - write!(f, "delete") + PatchOperation::Diff => { + write!(f, "diff") } - PatchOperation::Edit => { - write!(f, "edit") - } - PatchOperation::Comment => { - write!(f, "comment") + PatchOperation::Show => { + write!(f, "show") } } } diff --git a/bin/commands/patch/flux/select/ui.rs b/bin/commands/patch/flux/select/ui.rs index 3a8a360f..53a684b4 100644 --- a/bin/commands/patch/flux/select/ui.rs +++ b/bin/commands/patch/flux/select/ui.rs @@ -115,34 +115,10 @@ impl Widget for ListPage { }); } } - Key::Char('m') => { - if let Some(selected) = &self.props.selected { - let selection = Selection { - operation: Some(PatchOperation::Comment.to_string()), - ids: vec![selected.id], - args: vec![], - }; - let _ = self.action_tx.send(Action::Exit { - selection: Some(selection), - }); - } - } - Key::Char('e') => { - if let Some(selected) = &self.props.selected { - let selection = Selection { - operation: Some(PatchOperation::Edit.to_string()), - ids: vec![selected.id], - args: vec![], - }; - let _ = self.action_tx.send(Action::Exit { - selection: Some(selection), - }); - } - } Key::Char('d') => { if let Some(selected) = &self.props.selected { let selection = Selection { - operation: Some(PatchOperation::Delete.to_string()), + operation: Some(PatchOperation::Diff.to_string()), ids: vec![selected.id], args: vec![], }; @@ -168,9 +144,7 @@ impl Render<()> for ListPage { Mode::Operation => vec![ Shortcut::new("enter", "show"), Shortcut::new("c", "checkout"), - Shortcut::new("m", "comment"), - Shortcut::new("e", "edit"), - Shortcut::new("d", "delete"), + Shortcut::new("d", "diff"), ], };