Updated UI to have contextual help with tables so the UI doesn't feel so crowded
This commit is contained in:
@@ -84,7 +84,7 @@ fn draw_add_movie_search<B: Backend>(f: &mut Frame<'_, B>, app: &mut App, area:
|
||||
| ActiveRadarrBlock::AddMovieSelectMonitor
|
||||
| ActiveRadarrBlock::AddMovieSelectMinimumAvailability
|
||||
| ActiveRadarrBlock::AddMovieSelectQualityProfile => {
|
||||
let mut help_text = Text::from("<esc> edit search");
|
||||
let mut help_text = Text::from("<enter> details | <esc> edit search");
|
||||
help_text.patch_style(style_help());
|
||||
let help_paragraph = Paragraph::new(help_text)
|
||||
.block(borderless_block())
|
||||
@@ -113,6 +113,7 @@ fn draw_add_movie_search<B: Backend>(f: &mut Frame<'_, B>, app: &mut App, area:
|
||||
Constraint::Percentage(14),
|
||||
Constraint::Percentage(30),
|
||||
],
|
||||
help: None,
|
||||
},
|
||||
|movie| {
|
||||
let (hours, minutes) = convert_runtime(movie.runtime.as_u64().unwrap());
|
||||
|
||||
@@ -118,6 +118,11 @@ fn draw_collection_details<B: Backend>(f: &mut Frame<'_, B>, app: &mut App, cont
|
||||
Constraint::Percentage(18),
|
||||
Constraint::Percentage(30),
|
||||
],
|
||||
help: app
|
||||
.data
|
||||
.radarr_data
|
||||
.main_tabs
|
||||
.get_active_tab_contextual_help(),
|
||||
},
|
||||
|movie| {
|
||||
let (hours, minutes) = convert_runtime(movie.runtime.as_u64().unwrap());
|
||||
|
||||
@@ -143,6 +143,11 @@ fn draw_library<B: Backend>(f: &mut Frame<'_, B>, app: &mut App, area: Rect) {
|
||||
Constraint::Percentage(12),
|
||||
Constraint::Percentage(12),
|
||||
],
|
||||
help: app
|
||||
.data
|
||||
.radarr_data
|
||||
.main_tabs
|
||||
.get_active_tab_contextual_help(),
|
||||
},
|
||||
|movie| {
|
||||
let (hours, minutes) = convert_runtime(movie.runtime.as_u64().unwrap());
|
||||
@@ -298,6 +303,11 @@ fn draw_downloads<B: Backend>(f: &mut Frame<'_, B>, app: &mut App, area: Rect) {
|
||||
Constraint::Percentage(17),
|
||||
Constraint::Percentage(13),
|
||||
],
|
||||
help: app
|
||||
.data
|
||||
.radarr_data
|
||||
.main_tabs
|
||||
.get_active_tab_contextual_help(),
|
||||
},
|
||||
|download_record| {
|
||||
let DownloadRecord {
|
||||
@@ -352,6 +362,11 @@ fn draw_collections<B: Backend>(f: &mut Frame<'_, B>, app: &mut App, area: Rect)
|
||||
"Quality Profile",
|
||||
],
|
||||
constraints: iter::repeat(Constraint::Ratio(1, 5)).take(5).collect(),
|
||||
help: app
|
||||
.data
|
||||
.radarr_data
|
||||
.main_tabs
|
||||
.get_active_tab_contextual_help(),
|
||||
},
|
||||
|collection| {
|
||||
let number_of_movies = collection.movies.clone().unwrap_or_default().len();
|
||||
|
||||
@@ -220,6 +220,11 @@ fn draw_movie_history<B: Backend>(f: &mut Frame<'_, B>, app: &mut App, content_a
|
||||
Constraint::Percentage(14),
|
||||
Constraint::Percentage(21),
|
||||
],
|
||||
help: app
|
||||
.data
|
||||
.radarr_data
|
||||
.movie_info_tabs
|
||||
.get_active_tab_contextual_help(),
|
||||
},
|
||||
|movie_history_item| {
|
||||
let MovieHistoryItem {
|
||||
@@ -268,6 +273,11 @@ fn draw_movie_cast<B: Backend>(f: &mut Frame<'_, B>, app: &mut App, content_area
|
||||
content: &mut app.data.radarr_data.movie_cast,
|
||||
constraints: iter::repeat(Constraint::Ratio(1, 2)).take(2).collect(),
|
||||
table_headers: vec!["Cast Member", "Character"],
|
||||
help: app
|
||||
.data
|
||||
.radarr_data
|
||||
.movie_info_tabs
|
||||
.get_active_tab_contextual_help(),
|
||||
},
|
||||
|cast_member| {
|
||||
let Credit {
|
||||
@@ -295,6 +305,11 @@ fn draw_movie_crew<B: Backend>(f: &mut Frame<'_, B>, app: &mut App, content_area
|
||||
content: &mut app.data.radarr_data.movie_crew,
|
||||
constraints: iter::repeat(Constraint::Ratio(1, 3)).take(3).collect(),
|
||||
table_headers: vec!["Crew Member", "Job", "Department"],
|
||||
help: app
|
||||
.data
|
||||
.radarr_data
|
||||
.movie_info_tabs
|
||||
.get_active_tab_contextual_help(),
|
||||
},
|
||||
|crew_member| {
|
||||
let Credit {
|
||||
@@ -346,6 +361,11 @@ fn draw_movie_releases<B: Backend>(f: &mut Frame<'_, B>, app: &mut App, content_
|
||||
table_headers: vec![
|
||||
"Source", "Age", "⛔", "Title", "Indexer", "Size", "Peers", "Language", "Quality",
|
||||
],
|
||||
help: app
|
||||
.data
|
||||
.radarr_data
|
||||
.movie_info_tabs
|
||||
.get_active_tab_contextual_help(),
|
||||
},
|
||||
|release| {
|
||||
let Release {
|
||||
|
||||
Reference in New Issue
Block a user