diff --git a/src/components/arr/ArrInstanceForm.svelte b/src/components/arr/ArrInstanceForm.svelte index 393c0d8..41c721e 100644 --- a/src/components/arr/ArrInstanceForm.svelte +++ b/src/components/arr/ArrInstanceForm.svelte @@ -92,251 +92,280 @@ $: errorMessage = mode === 'create' ? 'Failed to save instance' : 'Failed to update instance'; -
-
+
+

{title}

-

+

{description}

-
-
{ - return async ({ result, update }) => { - if (result.type === 'failure' && result.data) { - // Show error toast - toastStore.add('error', (result.data as { error?: string }).error || errorMessage); - } else if (result.type === 'redirect') { - // Show success toast before redirect - toastStore.add('success', successMessage); - } - await update(); - }; - }} + { + return async ({ result, update }) => { + if (result.type === 'failure' && result.data) { + toastStore.add('error', (result.data as { error?: string }).error || errorMessage); + } else if (result.type === 'redirect') { + toastStore.add('success', successMessage); + } + await update(); + }; + }} + > + +
- -
- - -
+

+ Instance Details +

- -
- - {#if mode === 'edit'} - +
+ +
+ -

- Type cannot be changed after creation -

- - {:else} - - - {/if} -
- - -
- - -
- - -
- - - {#if mode === 'edit'} -

- Re-enter API key to update or test connection -

- {/if} -
- - -
- -
- + placeholder="e.g., Main Radarr, 4K Sonarr" + class="mt-1 block w-full rounded-lg border border-neutral-300 bg-white px-3 py-2 text-sm text-neutral-900 placeholder-neutral-400 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500 dark:border-neutral-700 dark:bg-neutral-800 dark:text-neutral-100 dark:placeholder-neutral-500" + />
-

- Optional. Press Enter to add a tag, Backspace to remove. -

- - 0 ? JSON.stringify(tags) : ''} /> -
- -
-
-
-
+
- {#if mode === 'edit'} - - Cancel - - {/if} -
+ +
+

+ Connection Settings +

- + URL * + +
- - {#if connectionStatus === 'success'} -

- Connection test passed! You can now save this instance. -

- {/if} - {#if connectionStatus === 'error'} -

- {connectionError} -

- {/if} - {#if !canSubmit && connectionStatus !== 'success'} -

- Please test the connection before saving -

- {/if} + +
+ + + {#if mode === 'edit'} +

+ Re-enter API key to update or test connection +

+ {/if} +
- - - {#if mode === 'edit'} -
-

Danger Zone

-

- Once you delete this instance, there is no going back. Please be certain. -

+
+
+ {#if connectionStatus === 'success'} +

+ Connection test passed! You can now save this instance. +

+ {/if} + {#if connectionStatus === 'error'} +

+ {connectionError} +

+ {/if} + {#if !canSubmit && connectionStatus !== 'success'} +

+ Please test the connection before saving +

+ {/if} +
+ - - -
- {/if} -
+
+ + +
+

+ Tags +

+ + +
+ +
+

+ Press Enter to add a tag, Backspace to remove. +

+ 0 ? JSON.stringify(tags) : ''} /> +
+ + +
+ {#if mode === 'edit'} + + Cancel + + {/if} + +
+ + + + {#if mode === 'edit'} +
+

Danger Zone

+

+ Once you delete this instance, there is no going back. Please be certain. +

+ + + +
+ {/if}