mirror of
https://seed.radicle.dev/rad:z39mP9rQAaGmERfUMPULfPUi473tY.git
synced 2026-11-28 22:10:27 +08:00
patch: Remove filter icon and faint stats divider
This commit is contained in:
@@ -18,6 +18,7 @@ use radicle_tui as tui;
|
||||
use tui::common::cob::patch::Filter;
|
||||
use tui::flux::ui::cob::PatchItem;
|
||||
use tui::flux::ui::span;
|
||||
use tui::flux::ui::theme::style;
|
||||
use tui::flux::ui::widget::container::{Footer, FooterProps, Header, HeaderProps};
|
||||
use tui::flux::ui::widget::{
|
||||
Render, Shortcut, Shortcuts, ShortcutsProps, Table, TableProps, Widget,
|
||||
@@ -369,32 +370,27 @@ impl Render<()> for Patches {
|
||||
},
|
||||
);
|
||||
|
||||
let filter = if !self.props.filter.to_string().is_empty() {
|
||||
Line::from(
|
||||
[
|
||||
span::badge("▼".to_string()),
|
||||
span::default(" ".to_string()),
|
||||
span::default(self.props.filter.to_string()).magenta().dim(),
|
||||
]
|
||||
.to_vec(),
|
||||
)
|
||||
} else {
|
||||
Line::from([span::blank()].to_vec())
|
||||
};
|
||||
let filter = Line::from(
|
||||
[
|
||||
span::default(" ".to_string()),
|
||||
span::default(self.props.filter.to_string()).magenta().dim(),
|
||||
]
|
||||
.to_vec(),
|
||||
);
|
||||
|
||||
let stats = Line::from(
|
||||
[
|
||||
span::default(self.props.stats.get("Draft").unwrap_or(&0).to_string()).dim(),
|
||||
span::default(" Draft".to_string()).dim(),
|
||||
span::default(" | ".to_string()).dim(),
|
||||
span::default(" | ".to_string()).style(style::border(false)),
|
||||
span::positive(self.props.stats.get("Open").unwrap_or(&0).to_string()).dim(),
|
||||
span::default(" Open".to_string()).dim(),
|
||||
span::default(" | ".to_string()).dim(),
|
||||
span::default(" | ".to_string()).style(style::border(false)),
|
||||
span::default(self.props.stats.get("Merged").unwrap_or(&0).to_string())
|
||||
.magenta()
|
||||
.dim(),
|
||||
span::default(" Merged".to_string()).dim(),
|
||||
span::default(" | ".to_string()).dim(),
|
||||
span::default(" | ".to_string()).style(style::border(false)),
|
||||
span::default(self.props.stats.get("Archived").unwrap_or(&0).to_string())
|
||||
.yellow()
|
||||
.dim(),
|
||||
|
||||
Reference in New Issue
Block a user