{ if (isOpen) { focusFirstInput(); } else { // Prevent closing if there are unsaved changes - show confirmation instead if (hasChanges) { // Re-open the dialog and show confirmation open = true; showConfirmClose = true; } // If no changes, let it close naturally } }} >
{#if mode === 'create'} Create compose stack {:else} {stackName} {/if} {#if mode === 'create'} Create a new Docker Compose stack {:else} Edit compose file and view stack structure {/if}
{#if activeTab === 'editor'} {/if}
{#if error} {error} {/if} {#if errors.compose} {errors.compose} {/if} {#if mode === 'edit' && loading}
Loading compose file...
{:else if mode === 'edit' && loadError}

Could not load compose file

{loadError}

This stack may have been created outside of Dockhand or the compose file may have been moved.

{:else} {#if mode === 'create'}
errors.stackName = undefined} /> {#if errors.stackName}

{errors.stackName}

{/if}
{/if}
{#if activeTab === 'editor'}
{#if open}
{/if}
Environment variables
validateEnvVars()} />
{:else if activeTab === 'graph'} {/if}
{/if}
{#if hasChanges} Unsaved changes {:else} No changes {/if}
{#if mode === 'create'} {:else} {/if}
Unsaved changes You have unsaved changes. Are you sure you want to close without saving?