harmony/harmony-rs/harmony_tui/src/widget/help.rs
Jean-Gabriel Gill-Couture 0cfd5dc89e fix(tui): handle 'End' key for bottom logs navigation
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.
2025-01-29 15:50:35 -05:00

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)
}
}