diff --git a/src/lib/client/ui/actions/ActionButton.svelte b/src/lib/client/ui/actions/ActionButton.svelte index 266a5a5..559c627 100644 --- a/src/lib/client/ui/actions/ActionButton.svelte +++ b/src/lib/client/ui/actions/ActionButton.svelte @@ -3,6 +3,7 @@ import type { ComponentType } from 'svelte'; export let icon: ComponentType | undefined = undefined; + export let iconClass: string = ''; export let square: boolean = true; // Fixed size square button export let hasDropdown: boolean = false; export let dropdownPosition: 'left' | 'right' | 'middle' = 'left'; @@ -39,7 +40,7 @@ on:click > {#if icon} - + {/if} diff --git a/src/lib/client/ui/form/IconCheckbox.svelte b/src/lib/client/ui/form/IconCheckbox.svelte index 066b7f2..59370be 100644 --- a/src/lib/client/ui/form/IconCheckbox.svelte +++ b/src/lib/client/ui/form/IconCheckbox.svelte @@ -3,7 +3,7 @@ export let checked: boolean = false; export let icon: ComponentType; - export let color: string = 'blue'; // blue, green, red, or hex color like #FFC230 + export let color: string = 'accent'; // accent, blue, green, red, or hex color like #FFC230 export let shape: 'square' | 'circle' | 'rounded' = 'rounded'; export let disabled: boolean = false; @@ -16,6 +16,7 @@ $: shapeClass = shapeClasses[shape] || shapeClasses.rounded; $: isCustomColor = color.startsWith('#'); + $: isAccent = color === 'accent'; {#if isCustomColor} @@ -38,6 +39,23 @@ {/if} +{:else if isAccent} + {:else} + + + + + + + + +
+
+
Automatic Dependencies
+

+ Quality Profiles will automatically sync the custom formats they need - you don't need to select them separately. +

+
+ +
+
Namespacing
+

+ Similarly named items from different databases will include invisible namespaces to ensure they don't override each other. +

+
+ +
+
Sync Methods
+ +
+
+
Manual
+

You manually click the sync button. Useful for media management settings that rarely get updates.

+
+ +
+
Schedule
+

Syncs on a defined schedule using cron expressions.

+
+ +
+
On Pull
+

Syncs when the upstream database gets a change (when you pull from remote).

+
+ +
+
On Change
+

Syncs when anything changes - whether you pull from upstream or change something yourself.

+
+
+
+ +
+
Cron Expressions
+

Schedule uses standard cron syntax: minute hour day month weekday

+
+
+ 0 * * * * + Every hour +
+
+ */15 * * * * + Every 15 minutes +
+
+ 0 0 * * * + Daily at midnight +
+
+ 0 6 * * 1 + Every Monday at 6am +
+
+
+
+
diff --git a/src/routes/arr/[id]/sync/components/DelayProfiles.svelte b/src/routes/arr/[id]/sync/components/DelayProfiles.svelte new file mode 100644 index 0000000..9057315 --- /dev/null +++ b/src/routes/arr/[id]/sync/components/DelayProfiles.svelte @@ -0,0 +1,122 @@ + + +
+ +
+

Delay Profiles

+

+ Select delay profiles to sync to this instance +

+
+ + +
+ {#if databases.length === 0} +

No databases configured

+ {:else} +
+ {#each databases as database} +
+

+ {database.name} +

+ + {#if database.delayProfiles.length === 0} +

No delay profiles

+ {:else} +
+ {#each database.delayProfiles as profile} +
+ { + state[database.id][profile.id] = !state[database.id][profile.id]; + }} + /> + + {profile.name} + +
+ {/each} +
+ {/if} +
+ {/each} +
+ {/if} +
+ + +
diff --git a/src/routes/arr/[id]/sync/components/MediaManagement.svelte b/src/routes/arr/[id]/sync/components/MediaManagement.svelte new file mode 100644 index 0000000..6a6cdb6 --- /dev/null +++ b/src/routes/arr/[id]/sync/components/MediaManagement.svelte @@ -0,0 +1,229 @@ + + +
+ +
+

Media Management

+

+ Select which database to use for each media management setting +

+
+ + +
+
+ +
+ + Naming + +
+ + + {#if showNamingDropdown} +
+ + {#each databases as database} + + {/each} +
+ {/if} +
+
+ + +
+ + Quality Definitions + +
+ + + {#if showQualityDropdown} +
+ + {#each databases as database} + + {/each} +
+ {/if} +
+
+ + +
+ + Media Settings + +
+ + + {#if showMediaDropdown} +
+ + {#each databases as database} + + {/each} +
+ {/if} +
+
+
+
+ + +
diff --git a/src/routes/arr/[id]/sync/components/QualityProfiles.svelte b/src/routes/arr/[id]/sync/components/QualityProfiles.svelte new file mode 100644 index 0000000..deff29e --- /dev/null +++ b/src/routes/arr/[id]/sync/components/QualityProfiles.svelte @@ -0,0 +1,122 @@ + + +
+ +
+

Quality Profiles

+

+ Select quality profiles to sync to this instance +

+
+ + +
+ {#if databases.length === 0} +

No databases configured

+ {:else} +
+ {#each databases as database} +
+

+ {database.name} +

+ + {#if database.qualityProfiles.length === 0} +

No quality profiles

+ {:else} +
+ {#each database.qualityProfiles as profile} +
+ { + state[database.id][profile.id] = !state[database.id][profile.id]; + }} + /> + + {profile.name} + +
+ {/each} +
+ {/if} +
+ {/each} +
+ {/if} +
+ + +
diff --git a/src/routes/arr/[id]/sync/components/SyncFooter.svelte b/src/routes/arr/[id]/sync/components/SyncFooter.svelte new file mode 100644 index 0000000..8e76804 --- /dev/null +++ b/src/routes/arr/[id]/sync/components/SyncFooter.svelte @@ -0,0 +1,70 @@ + + +
+
+
+ Trigger + {#each triggerOptions as option} +
+ (syncTrigger = option.value)} + /> + {option.label} +
+ {/each} + + {#if syncTrigger === 'schedule'} + + {/if} +
+ +
+ + +
+
+