From 643ba8ce00c655d133aeff4fb4b4087404295679 Mon Sep 17 00:00:00 2001 From: Sam Chau Date: Fri, 16 Jan 2026 20:35:29 +1030 Subject: [PATCH] refactor: move arr header buttons into action bar, improve breadcrumbing --- src/lib/client/ui/actions/ActionButton.svelte | 14 +- src/lib/client/ui/navigation/tabs/Tabs.svelte | 24 ++- .../client/ui/table/TableActionButton.svelte | 3 +- src/routes/arr/[id]/+layout.server.ts | 21 +++ src/routes/arr/[id]/+layout.svelte | 14 +- src/routes/arr/[id]/library/+page.server.ts | 22 +-- src/routes/arr/[id]/library/+page.svelte | 77 +++++---- .../components/LibraryActionBar.svelte | 160 +++++++++++------- .../library/components/LibraryHeader.svelte | 109 ------------ 9 files changed, 212 insertions(+), 232 deletions(-) create mode 100644 src/routes/arr/[id]/+layout.server.ts delete mode 100644 src/routes/arr/[id]/library/components/LibraryHeader.svelte diff --git a/src/lib/client/ui/actions/ActionButton.svelte b/src/lib/client/ui/actions/ActionButton.svelte index 26d70b0..75d2c3f 100644 --- a/src/lib/client/ui/actions/ActionButton.svelte +++ b/src/lib/client/ui/actions/ActionButton.svelte @@ -8,6 +8,9 @@ export let hasDropdown: boolean = false; export let dropdownPosition: 'left' | 'right' | 'middle' = 'left'; export let disabled: boolean = false; + export let title: string = ''; + export let type: 'button' | 'submit' = 'button'; + export let variant: 'neutral' | 'danger' = 'neutral'; let isHovered = false; let leaveTimer: ReturnType | null = null; @@ -26,6 +29,11 @@ isHovered = false; }, 100); } + + const variantClasses = { + neutral: 'hover:bg-neutral-100 dark:hover:bg-neutral-700', + danger: 'hover:bg-red-50 hover:text-red-600 dark:hover:bg-red-900/20 dark:hover:text-red-400' + };
{:else} - - {#if !loading} - - {/if} - {#if allMoviesWithFiles.length === 0 && !loading}
@@ -343,3 +356,9 @@ {/if} {/if}
+ + +

+ Placeholder content. More information coming soon. +

+
diff --git a/src/routes/arr/[id]/library/components/LibraryActionBar.svelte b/src/routes/arr/[id]/library/components/LibraryActionBar.svelte index fbce0d3..ccd255a 100644 --- a/src/routes/arr/[id]/library/components/LibraryActionBar.svelte +++ b/src/routes/arr/[id]/library/components/LibraryActionBar.svelte @@ -1,5 +1,5 @@ - + - -
- {#each toggleableColumns as colKey} - - {/each} + +
+

Filter movies by quality or profile

-
- - - - -
@@ -114,39 +90,95 @@ - - Change Profile - ({filteredCount}) + - -
- {#if profilesByDatabase.length === 0} -
- No databases configured -
- {:else} - {#each profilesByDatabase as db} -
-
- - - {db.databaseName} - -
- {#each db.profiles as profile} - - {/each} -
- {/each} - {/if} + +
+

Toggle visible table columns

+
+
+ {#each toggleableColumns as colKey} + + {/each}
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/routes/arr/[id]/library/components/LibraryHeader.svelte b/src/routes/arr/[id]/library/components/LibraryHeader.svelte deleted file mode 100644 index 62891a7..0000000 --- a/src/routes/arr/[id]/library/components/LibraryHeader.svelte +++ /dev/null @@ -1,109 +0,0 @@ - - -