{#if $environments.length === 0 || !$currentEnvironment}
{:else}
{#if dropdownOpen}
{#if filteredContainers().length === 0}
{containers.length === 0 ? 'No running containers' : 'No matches found'}
{:else} {#each filteredContainers() as container}
selectContainer(container)} class="w-full px-3 py-2 text-left text-sm hover:bg-muted transition-colors flex items-center gap-2 {selectedContainer?.id === container.id ? 'bg-muted' : ''}" >
{container.name}
({container.image})
{#if selectedContainer?.id === container.id}
connected
{/if}
{/each} {/if}
{/if}
{#if selectedContainer}
Disconnect
{/if} {#if !selectedContainer}
Shell:
{shellOptions.find(o => o.value === selectedShell)?.label || 'Select'}
{#each shellOptions as option}
{option.label}
{/each}
User:
{userOptions.find(o => o.value === selectedUser)?.label || 'Select'}
{#each userOptions as option}
{option.label}
{/each}
{/if}
{#if !selectedContainer}
Select a container to open shell
{:else}
{#if connected}
Connected
{:else}
Disconnected
{/if}
changeFontSize(Number(v))}>
{terminalFontSize}px
{#each fontSizeOptions as size}
{size}px
{/each}
terminalComponent?.copyOutput()} class="p-1 rounded hover:bg-zinc-800 transition-colors" title="Copy output" >
terminalComponent?.clear()} class="p-1 rounded hover:bg-zinc-800 transition-colors" title="Clear (Cmd+L)" >
terminalComponent?.reconnect()} class="p-1 rounded hover:bg-zinc-800 transition-colors" title="Reconnect" >
{#key selectedContainer.id}
{/key}
{/if}
{/if}