From 8909cb668f8f66245cc4d30fed59c3aa2f7e3331 Mon Sep 17 00:00:00 2001 From: Erik Kundt Date: Wed, 24 Jan 2024 18:03:36 +0100 Subject: [PATCH] patch-select: Add support for patch filter option --- bin/commands/patch.rs | 90 ++++++++++++++++++------------- bin/commands/patch/common/ui.rs | 25 ++++++--- bin/commands/patch/select.rs | 10 ++-- bin/commands/patch/select/page.rs | 12 ++--- src/cob.rs | 1 + src/cob/format.rs | 7 +++ src/cob/patch.rs | 78 +++++++++++++++++++++++++-- src/context.rs | 2 +- src/ui/theme.rs | 11 +++- 9 files changed, 177 insertions(+), 59 deletions(-) create mode 100644 src/cob/format.rs diff --git a/bin/commands/patch.rs b/bin/commands/patch.rs index 9cb1ab2f..03efaf24 100644 --- a/bin/commands/patch.rs +++ b/bin/commands/patch.rs @@ -10,7 +10,8 @@ use std::ffi::OsString; use anyhow::anyhow; use radicle_tui as tui; -use tui::cob::patch; + +use tui::cob::patch::{self, State}; use tui::{context, log, Window}; use crate::terminal; @@ -24,15 +25,23 @@ pub const HELP: Help = Help { usage: r#" Usage - rad-tui patch [