feat: Refactor all keybinding tips into a dynamically changing menu that can be invoked via '?' [#32]

This commit is contained in:
2025-08-12 16:27:34 -06:00
parent 1f4870d082
commit 00ab0f27f7
64 changed files with 1627 additions and 903 deletions
+11 -20
View File
@@ -5,8 +5,8 @@ use strum::EnumIter;
use crate::{
app::{
context_clues::{
build_context_clue_string, BLOCKLIST_CONTEXT_CLUES, DOWNLOADS_CONTEXT_CLUES,
INDEXERS_CONTEXT_CLUES, ROOT_FOLDERS_CONTEXT_CLUES, SYSTEM_CONTEXT_CLUES,
BLOCKLIST_CONTEXT_CLUES, DOWNLOADS_CONTEXT_CLUES, INDEXERS_CONTEXT_CLUES,
ROOT_FOLDERS_CONTEXT_CLUES, SYSTEM_CONTEXT_CLUES,
},
sonarr::sonarr_context_clues::{
HISTORY_CONTEXT_CLUES, SERIES_CONTEXT_CLUES, SERIES_DETAILS_CONTEXT_CLUES,
@@ -130,50 +130,43 @@ impl<'a> Default for SonarrData<'a> {
TabRoute {
title: "Library".to_string(),
route: ActiveSonarrBlock::Series.into(),
help: String::new(),
contextual_help: Some(build_context_clue_string(&SERIES_CONTEXT_CLUES)),
contextual_help: Some(&SERIES_CONTEXT_CLUES),
config: None,
},
TabRoute {
title: "Downloads".to_string(),
route: ActiveSonarrBlock::Downloads.into(),
help: String::new(),
contextual_help: Some(build_context_clue_string(&DOWNLOADS_CONTEXT_CLUES)),
contextual_help: Some(&DOWNLOADS_CONTEXT_CLUES),
config: None,
},
TabRoute {
title: "Blocklist".to_string(),
route: ActiveSonarrBlock::Blocklist.into(),
help: String::new(),
contextual_help: Some(build_context_clue_string(&BLOCKLIST_CONTEXT_CLUES)),
contextual_help: Some(&BLOCKLIST_CONTEXT_CLUES),
config: None,
},
TabRoute {
title: "History".to_string(),
route: ActiveSonarrBlock::History.into(),
help: String::new(),
contextual_help: Some(build_context_clue_string(&HISTORY_CONTEXT_CLUES)),
contextual_help: Some(&HISTORY_CONTEXT_CLUES),
config: None,
},
TabRoute {
title: "Root Folders".to_string(),
route: ActiveSonarrBlock::RootFolders.into(),
help: String::new(),
contextual_help: Some(build_context_clue_string(&ROOT_FOLDERS_CONTEXT_CLUES)),
contextual_help: Some(&ROOT_FOLDERS_CONTEXT_CLUES),
config: None,
},
TabRoute {
title: "Indexers".to_string(),
route: ActiveSonarrBlock::Indexers.into(),
help: String::new(),
contextual_help: Some(build_context_clue_string(&INDEXERS_CONTEXT_CLUES)),
contextual_help: Some(&INDEXERS_CONTEXT_CLUES),
config: None,
},
TabRoute {
title: "System".to_string(),
route: ActiveSonarrBlock::System.into(),
help: String::new(),
contextual_help: Some(build_context_clue_string(&SYSTEM_CONTEXT_CLUES)),
contextual_help: Some(&SYSTEM_CONTEXT_CLUES),
config: None,
},
]),
@@ -181,15 +174,13 @@ impl<'a> Default for SonarrData<'a> {
TabRoute {
title: "Seasons".to_string(),
route: ActiveSonarrBlock::SeriesDetails.into(),
help: String::new(),
contextual_help: Some(build_context_clue_string(&SERIES_DETAILS_CONTEXT_CLUES)),
contextual_help: Some(&SERIES_DETAILS_CONTEXT_CLUES),
config: None,
},
TabRoute {
title: "History".to_string(),
route: ActiveSonarrBlock::SeriesHistory.into(),
help: String::new(),
contextual_help: Some(build_context_clue_string(&SERIES_HISTORY_CONTEXT_CLUES)),
contextual_help: Some(&SERIES_HISTORY_CONTEXT_CLUES),
config: None,
},
]),