feat(readarr): add the edit author UI
Renders the edit author prompt with a snapshot per step of the selection state machine, seeding distinct quality and metadata profile values so a swap between the two dropdowns cannot go unnoticed.
This commit is contained in:
19 files changed
+1284
-2
No files matched your search
@@ -1,5 +1,6 @@
|
||||
use add_author_ui::AddAuthorUi;
|
||||
use author_details_ui::AuthorDetailsUi;
|
||||
use edit_author_ui::EditAuthorUi;
|
||||
use ratatui::{
|
||||
Frame,
|
||||
layout::{Constraint, Rect},
|
||||
@@ -29,6 +30,7 @@ use crate::{
|
||||
mod add_author_ui;
|
||||
mod author_details_ui;
|
||||
mod book_details_ui;
|
||||
mod edit_author_ui;
|
||||
mod edition_details_ui;
|
||||
|
||||
#[cfg(test)]
|
||||
@@ -41,6 +43,7 @@ impl DrawUi for LibraryUi {
|
||||
fn accepts(route: Route) -> bool {
|
||||
if let Route::Readarr(active_readarr_block, _) = route {
|
||||
return AddAuthorUi::accepts(route)
|
||||
|| EditAuthorUi::accepts(route)
|
||||
|| AuthorDetailsUi::accepts(route)
|
||||
|| LIBRARY_BLOCKS.contains(&active_readarr_block);
|
||||
}
|
||||
@@ -55,6 +58,7 @@ impl DrawUi for LibraryUi {
|
||||
match route {
|
||||
_ if AddAuthorUi::accepts(route) => AddAuthorUi::draw(f, app, area),
|
||||
_ if AuthorDetailsUi::accepts(route) => AuthorDetailsUi::draw(f, app, area),
|
||||
_ if EditAuthorUi::accepts(route) => EditAuthorUi::draw(f, app, area),
|
||||
Route::Readarr(ActiveReadarrBlock::UpdateAllAuthorsPrompt, _) => {
|
||||
let confirmation_prompt = ConfirmationPrompt::new()
|
||||
.title("Update All Authors")
|
||||
|
||||
Reference in new issue
Block a user