Tweaked the key mappings so that it is now easier to change key mappings and update the corresponding UI elements as well

This commit is contained in:
2023-08-08 10:50:07 -06:00
parent 74011b9ab3
commit 5602fc4341
16 changed files with 469 additions and 206 deletions
+6 -2
View File
@@ -4,6 +4,7 @@ mod tests {
use pretty_assertions::{assert_eq, assert_str_eq};
use tokio::sync::mpsc;
use crate::app::key_binding::{build_keymapping_string, SERVARR_KEYMAPPINGS};
use crate::app::radarr::{ActiveRadarrBlock, RadarrData};
use crate::app::{App, Data, RadarrConfig, DEFAULT_ROUTE};
use crate::models::{HorizontallyScrollableText, Route, TabRoute};
@@ -26,13 +27,16 @@ mod tests {
TabRoute {
title: "Radarr",
route: ActiveRadarrBlock::Movies.into(),
help: "<↑↓> scroll | ←→ change tab | <tab> change servarr | <q> quit ",
help: format!(
"<↑↓> scroll | ←→ change tab | {} ",
build_keymapping_string(&SERVARR_KEYMAPPINGS)
),
contextual_help: None,
},
TabRoute {
title: "Sonarr",
route: Route::Sonarr,
help: "<tab> change servarr | <q> quit ",
help: format!("{} ", build_keymapping_string(&SERVARR_KEYMAPPINGS)),
contextual_help: None,
},
]