{terminalId ? name || $i18n.t('Terminal settings') : $i18n.t('New terminal')}

{#if terminalId && !loading} (showAccess = true)} /> {/if}
{#if loading}
{:else}
{#if error}{/if} {#if !terminalId && connections.length > 1} {#each connections as connection} {/each} {/if} option.value === scope)?.hint ?? 'All chats share one instance.' )} let:labelId >
{#if scope} {$i18n.t('per')} {#each scopes as option} {/each} {/if} (scope = e.detail ? 'user' : '')} />
{#if showAdvanced}
{#each images.length ? images : defaultImages as value} {/each} {#each ['0.5', '1', '2', '4', '8'] as value}{/each} {#each ['512Mi', '1Gi', '2Gi', '4Gi', '8Gi', '16Gi'] as value}{/each} {#each ['1Gi', '5Gi', '10Gi', '20Gi', '50Gi'] as value}{/each} {#each status?.network_profiles ?? [] as value}{/each}
{$i18n.t('Environment variables')}
{#each env as row, index}
{/each}

{$i18n.t('Set when the instance starts.')}

{/if}
{#if terminalId}
{$i18n.t('Instances')} {machines.length}
{#each machines as machine (machine.id)} {@const title = machineName(machine)}
{title}{#if machine.user_name} · {machine.user_name}{/if}
{#if pending[machine.id]} {$i18n.t(pendingCopy[pending[machine.id]])} {:else} {machine.status === 'running' ? $i18n.t('Running') : $i18n.t('Stopped')} {/if}
{@const target = machineTarget(machine)} {#if machine.status === 'running'} {#if target} {/if} {:else} {/if}
{:else}
{$i18n.t('No instances yet. One starts the first time the terminal is used.')}
{/each}
{/if}
{#if terminalId} {/if}
{/if}
{#if showAccess}
{$i18n.t('Access')}: {name}

{$i18n.t('People with access can run commands and see every file on this terminal.')}

{/if} {#if info} {#key info} (info = null)} /> {/key} {/if} {#if files} {#key files} (files = null)} /> {/key} {/if} confirmation?.run()} />