feat(readarr): add the downloads UI
Render the Readarr downloads table with the cancel download prompt and the update downloads prompt, and dispatch it from ReadarrUi so the tab is reachable. The snapshot suite covers every block in DOWNLOADS_BLOCKS plus loading and empty states. A second set of snapshots seeds a two row fixture and selects the second row. Its rows deliberately have different completion ratios, so that inverting the percentage calculation is caught rather than cancelling out against a half finished download.
This commit is contained in:
11 files changed
+421
-3
No files matched your search
@@ -22,6 +22,7 @@ use super::{
|
||||
widgets::loading_block::LoadingBlock,
|
||||
};
|
||||
use crate::ui::readarr_ui::blocklist::BlocklistUi;
|
||||
use crate::ui::readarr_ui::downloads::DownloadsUi;
|
||||
use crate::ui::utils::{extract_monitored_disk_space_vec, extract_monitored_root_folders};
|
||||
use crate::{
|
||||
app::App,
|
||||
@@ -36,6 +37,7 @@ use crate::{
|
||||
};
|
||||
|
||||
mod blocklist;
|
||||
mod downloads;
|
||||
mod library;
|
||||
mod readarr_ui_utils;
|
||||
|
||||
@@ -56,6 +58,7 @@ impl DrawUi for ReadarrUi {
|
||||
|
||||
match route {
|
||||
_ if LibraryUi::accepts(route) => LibraryUi::draw(f, app, content_area),
|
||||
_ if DownloadsUi::accepts(route) => DownloadsUi::draw(f, app, content_area),
|
||||
_ if BlocklistUi::accepts(route) => BlocklistUi::draw(f, app, content_area),
|
||||
_ => (),
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user