Update the TUI to handle both 'Shift+G' and 'End' keys for navigating to the bottom of logs. Adjusted the help widget text accordingly to reflect this change.
21 lines
600 B
Rust
21 lines
600 B
Rust
use ratatui::widgets::{Paragraph, Widget, Wrap};
|
|
|
|
pub(crate) struct HelpWidget;
|
|
impl HelpWidget {
|
|
pub(crate) fn new() -> Self {
|
|
Self
|
|
}
|
|
}
|
|
|
|
impl Widget for HelpWidget {
|
|
fn render(self, area: ratatui::prelude::Rect, buf: &mut ratatui::prelude::Buffer)
|
|
where
|
|
Self: Sized {
|
|
let text = Paragraph::new("Usage => q/Esc: Quit | j/↑ :Select UP | k/↓: Select Down | Enter: Launch Score\nPageUp/PageDown: Scroll Logs | Shift+G/End: Logs bottom")
|
|
.centered()
|
|
.wrap(Wrap { trim: false });
|
|
|
|
Widget::render(text, area, buf)
|
|
}
|
|
}
|