Added field_type to Radarr events to dynamically display fields at runtime. Also updated the keybinding for events in the systems tab to reuse the 'e' key.

This commit is contained in:
2023-08-08 10:50:07 -06:00
parent 72194fe668
commit 52f22312f3
10 changed files with 47 additions and 28 deletions
+5 -5
View File
@@ -23,7 +23,7 @@ generate_keybindings! {
tasks,
refresh,
update,
queue,
events,
home,
end,
delete,
@@ -78,6 +78,10 @@ pub const DEFAULT_KEYBINDINGS: KeyBindings = KeyBindings {
key: Key::Char('e'),
desc: "Edit",
},
events: KeyBinding {
key: Key::Char('e'),
desc: "Events",
},
logs: KeyBinding {
key: Key::Char('l'),
desc: "Logs",
@@ -94,10 +98,6 @@ pub const DEFAULT_KEYBINDINGS: KeyBindings = KeyBindings {
key: Key::Char('u'),
desc: "Update",
},
queue: KeyBinding {
key: Key::Char('z'),
desc: "Queue",
},
home: KeyBinding {
key: Key::Home,
desc: "Home",
+3 -3
View File
@@ -330,7 +330,7 @@ impl<'a> Default for RadarrData<'a> {
title: "System",
route: ActiveRadarrBlock::System.into(),
help: "",
contextual_help: Some("<t> open tasks | <z> open queue | <l> open logs | <u> open updates | <r> refresh")
contextual_help: Some("<t> open tasks | <e> open events | <l> open logs | <u> open updates | <r> refresh")
}
]),
movie_info_tabs: TabState::new(vec![
@@ -429,7 +429,7 @@ pub enum ActiveRadarrBlock {
RootFolders,
System,
SystemLogs,
SystemQueue,
SystemQueuedEvents,
SystemTasks,
SystemTaskStartConfirmPrompt,
SystemUpdates,
@@ -533,7 +533,7 @@ pub static DELETE_MOVIE_SELECTION_BLOCKS: [ActiveRadarrBlock; 3] = [
];
pub static SYSTEM_DETAILS_BLOCKS: [ActiveRadarrBlock; 5] = [
ActiveRadarrBlock::SystemLogs,
ActiveRadarrBlock::SystemQueue,
ActiveRadarrBlock::SystemQueuedEvents,
ActiveRadarrBlock::SystemTasks,
ActiveRadarrBlock::SystemTaskStartConfirmPrompt,
ActiveRadarrBlock::SystemUpdates,
+1 -1
View File
@@ -368,7 +368,7 @@ mod tests {
assert!(radarr_data.main_tabs.tabs[5].help.is_empty());
assert_eq!(
radarr_data.main_tabs.tabs[5].contextual_help,
Some("<t> open tasks | <z> open queue | <l> open logs | <u> open updates | <r> refresh")
Some("<t> open tasks | <e> open events | <l> open logs | <u> open updates | <r> refresh")
);
assert_eq!(radarr_data.movie_info_tabs.tabs.len(), 6);