blob: 3357c58fab8a7eeb1c8b295dfd2dc2d28c895952 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
//! Status bar widget.
use ratatui::{prelude::*, widgets::Paragraph};
use crate::daemon::tui::app::{App, InputMode};
pub fn render(f: &mut Frame, area: Rect, app: &App) {
let keybindings = match app.input_mode {
InputMode::Normal => {
"↑↓:Navigate Enter:View e:Edit d:Delete Tab:Preview /:Search q:Quit"
}
InputMode::Search => "Type to search Enter:Select Esc:Cancel",
InputMode::Confirm => "y:Confirm n:Cancel",
};
let status = Paragraph::new(keybindings).style(Style::default().bg(Color::DarkGray));
f.render_widget(status, area);
}
|