2025-08-06 21:23:09 -07:00
|
|
|
//! Shared popup-related constants for bottom pane widgets.
|
|
|
|
|
|
2025-10-02 11:34:47 -07:00
|
|
|
use crossterm::event::KeyCode;
|
|
|
|
|
use ratatui::text::Line;
|
|
|
|
|
|
|
|
|
|
use crate::key_hint;
|
|
|
|
|
|
2025-08-06 21:23:09 -07:00
|
|
|
/// Maximum number of rows any popup should attempt to display.
|
|
|
|
|
/// Keep this consistent across all popups for a uniform feel.
|
|
|
|
|
pub(crate) const MAX_POPUP_ROWS: usize = 8;
|
2025-09-21 20:18:35 -07:00
|
|
|
|
|
|
|
|
/// Standard footer hint text used by popups.
|
2025-10-02 11:34:47 -07:00
|
|
|
pub(crate) fn standard_popup_hint_line() -> Line<'static> {
|
|
|
|
|
Line::from(vec![
|
|
|
|
|
"Press ".into(),
|
|
|
|
|
key_hint::plain(KeyCode::Enter).into(),
|
|
|
|
|
" to confirm or ".into(),
|
|
|
|
|
key_hint::plain(KeyCode::Esc).into(),
|
|
|
|
|
" to go back".into(),
|
|
|
|
|
])
|
|
|
|
|
}
|