{#if showImageInput}
{/if} {#if status !== 'idle'}
{#if status === 'pulling'} Pulling layers... {:else if status === 'complete'} Pull completed! {:else if status === 'error'} Failed {/if}
{#if status === 'pulling' || status === 'complete'} {#if totalLayers > 0} {completedLayers} / {totalLayers} layers {:else} ... {/if} {/if} {#if duration > 0}{formatDuration(duration)}{/if}
{#if status === 'pulling'}
{#if downloadStats.totalBytes > 0} Downloaded: {formatBytes(downloadStats.downloadedBytes)} / {formatBytes(downloadStats.totalBytes)} {/if}
{/if} {#if errorMessage}
{errorMessage}
{/if}
{#if status === 'pulling' || status === 'complete' || hasLayers}
{#each sortedLayers as layer (layer.id)} {@const percentage = getProgressPercentage(layer)} {@const statusLower = layer.status.toLowerCase()} {@const isComplete = statusLower.includes('complete') || statusLower.includes('already exists')} {@const isDownloading = statusLower.includes('downloading')} {@const isExtracting = statusLower.includes('extracting')} {/each}
Layer ID Status Progress
{layer.id.slice(0, 12)}
{#if isComplete} {:else if isDownloading || isExtracting} {:else} {/if} {layer.status}
{#if (isDownloading || isExtracting) && layer.current && layer.total}
{percentage}%
{:else if isComplete} Done {:else} - {/if}
{/if}
Output ({outputLines.length} lines)
{#each outputLines as line}
{#if line.startsWith('[pull]')} pull {line.slice(7)} {:else if line.startsWith('[layer]')} layer {line.slice(8)} {:else if line.startsWith('[error]')} error {line.slice(8)} {:else} {line} {/if}
{/each}
{/if} {#if status === 'idle' && !showImageInput}

Enter an image name to start pulling

{/if}