feat: Pagination support for jumping 20 items at a time in all table views [#45]
This commit is contained in:
@@ -40,7 +40,7 @@ mod tests {
|
||||
title: "Sonarr Test".to_owned(),
|
||||
route: ActiveSonarrBlock::default().into(),
|
||||
help: format!(
|
||||
"<↑↓> scroll | ←→ change tab | {} ",
|
||||
"<↑↓> scroll | <C-u/d> page up/down | ←→ change tab | {} ",
|
||||
build_context_clue_string(&SERVARR_CONTEXT_CLUES)
|
||||
),
|
||||
contextual_help: None,
|
||||
@@ -50,7 +50,7 @@ mod tests {
|
||||
title: "Radarr 1".to_owned(),
|
||||
route: ActiveRadarrBlock::default().into(),
|
||||
help: format!(
|
||||
"<↑↓> scroll | ←→ change tab | {} ",
|
||||
"<↑↓> scroll | <C-u/d> page up/down | ←→ change tab | {} ",
|
||||
build_context_clue_string(&SERVARR_CONTEXT_CLUES)
|
||||
),
|
||||
contextual_help: None,
|
||||
@@ -60,7 +60,7 @@ mod tests {
|
||||
title: "Radarr Test".to_owned(),
|
||||
route: ActiveRadarrBlock::default().into(),
|
||||
help: format!(
|
||||
"<↑↓> scroll | ←→ change tab | {} ",
|
||||
"<↑↓> scroll | <C-u/d> page up/down | ←→ change tab | {} ",
|
||||
build_context_clue_string(&SERVARR_CONTEXT_CLUES)
|
||||
),
|
||||
contextual_help: None,
|
||||
@@ -70,7 +70,7 @@ mod tests {
|
||||
title: "Sonarr 1".to_owned(),
|
||||
route: ActiveSonarrBlock::default().into(),
|
||||
help: format!(
|
||||
"<↑↓> scroll | ←→ change tab | {} ",
|
||||
"<↑↓> scroll | <C-u/d> page up/down | ←→ change tab | {} ",
|
||||
build_context_clue_string(&SERVARR_CONTEXT_CLUES)
|
||||
),
|
||||
contextual_help: None,
|
||||
|
||||
@@ -14,6 +14,8 @@ generate_keybindings! {
|
||||
down,
|
||||
left,
|
||||
right,
|
||||
pg_down,
|
||||
pg_up,
|
||||
backspace,
|
||||
next_servarr,
|
||||
previous_servarr,
|
||||
@@ -74,6 +76,16 @@ pub const DEFAULT_KEYBINDINGS: KeyBindings = KeyBindings {
|
||||
alt: Some(Key::Char('l')),
|
||||
desc: "right",
|
||||
},
|
||||
pg_down: KeyBinding {
|
||||
key: Key::PgDown,
|
||||
alt: Some(Key::Ctrl('d')),
|
||||
desc: "page down",
|
||||
},
|
||||
pg_up: KeyBinding {
|
||||
key: Key::PgUp,
|
||||
alt: Some(Key::Ctrl('u')),
|
||||
desc: "page up",
|
||||
},
|
||||
backspace: KeyBinding {
|
||||
key: Key::Backspace,
|
||||
alt: Some(Key::Ctrl('h')),
|
||||
|
||||
@@ -13,6 +13,8 @@ mod test {
|
||||
#[case(DEFAULT_KEYBINDINGS.down, Key::Down, Some(Key::Char('j')), "down")]
|
||||
#[case(DEFAULT_KEYBINDINGS.left, Key::Left, Some(Key::Char('h')), "left")]
|
||||
#[case(DEFAULT_KEYBINDINGS.right, Key::Right, Some(Key::Char('l')), "right")]
|
||||
#[case(DEFAULT_KEYBINDINGS.pg_down, Key::PgDown, Some(Key::Ctrl('d')), "page down")]
|
||||
#[case(DEFAULT_KEYBINDINGS.pg_up, Key::PgUp, Some(Key::Ctrl('u')), "page up")]
|
||||
#[case(DEFAULT_KEYBINDINGS.backspace, Key::Backspace, Some(Key::Ctrl('h')), "backspace")]
|
||||
#[case(DEFAULT_KEYBINDINGS.next_servarr, Key::Tab, None, "next servarr")]
|
||||
#[case(DEFAULT_KEYBINDINGS.previous_servarr, Key::BackTab, None, "previous servarr")]
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ impl App<'_> {
|
||||
) -> Self {
|
||||
let mut server_tabs = Vec::new();
|
||||
let help = format!(
|
||||
"<↑↓> scroll | ←→ change tab | {} ",
|
||||
"<↑↓> scroll | <C-u/d> page up/down | ←→ change tab | {} ",
|
||||
build_context_clue_string(&SERVARR_CONTEXT_CLUES)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user