issue: Improve search display

This commit is contained in:
Erik Kundt
2024-04-03 17:14:09 +02:00
parent 044e8f579a
commit cf3de369ba
+12 -12
View File
@@ -400,17 +400,17 @@ impl Issues {
}
fn render_footer<B: Backend>(&self, frame: &mut ratatui::Frame, area: Rect) {
let search = if self.props.search.is_empty() {
Line::from([span::default(self.props.search.to_string()).magenta().dim()].to_vec())
} else {
Line::from(
[
span::default(" / ".to_string()).magenta().dim(),
span::default(self.props.search.to_string()).magenta().dim(),
]
.to_vec(),
)
};
let search = Line::from(
[
span::default(" Search ".to_string())
.cyan()
.dim()
.reversed(),
span::default(" ".into()),
span::default(self.props.search.to_string()).gray().dim(),
]
.to_vec(),
);
let open = Line::from(
[
@@ -600,7 +600,7 @@ impl Render<SearchProps> for Search {
frame,
layout[0],
TextFieldProps {
titles: ("/".into(), "Search".into()),
titles: ("Search".into(), "Search".into()),
show_cursor: true,
inline_label: true,
},