Radish alpha
r
Radicle terminal user interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
inbox: Improve search display
Erik Kundt committed 2 years ago
commit 2a0c8566d1b14ac86e0c73c7bd17043df0520016
parent cf3de369ba2e01bd051b344950d79d18baf0299f
1 file changed +12 -12
modified bin/commands/inbox/flux/select/ui.rs
@@ -412,17 +412,17 @@ impl Notifications {
    }

    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 seen = Line::from(
            [
@@ -589,7 +589,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,
            },