cobalt | {$t("clipboard.title")}

{$t("clipboard.title")}

{$t("clipboard.description")}

{#if !isConnected}

{$t("clipboard.create_session")}

{$t("clipboard.create_description")}

{isCreating ? $t("clipboard.creating") : $t("clipboard.create")}
{$t("general.or")}

{$t("clipboard.join_session")}

{$t("clipboard.join_description")}

{isJoining ? $t("clipboard.joining") : $t("clipboard.join")}
{:else}

{$t("clipboard.session_active")}

{$t("clipboard.session_id")}: {sessionId} 📋
{#if isCreator && sessionId && !peerConnected && qrCodeUrl}

{$t("clipboard.scan_qr")}

QR Code
{/if}
{peerConnected ? $t("clipboard.peer_connected") : $t("clipboard.waiting_peer")}
{#if peerConnected}

{$t("clipboard.send_text")}

{$t("clipboard.send")}

{$t("clipboard.send_files")}

dragover = true} on:dragleave={() => dragover = false} on:drop={handleDrop} on:click={() => document.getElementById('file-input')?.click()} on:keydown={(e) => e.key === 'Enter' && document.getElementById('file-input')?.click()} >

{$t("clipboard.drop_files")}

document.getElementById('file-input')?.click()} > {$t("clipboard.select_files")}
{#if files.length > 0}
{#each files as file, index}
{file.name} {formatFileSize(file.size)}
removeFile(index)} > ✕
{/each}
{sendingFiles ? $t("clipboard.sending") : $t("clipboard.send")} {#if sendingFiles || transferProgress > 0}
{Math.round(transferProgress)}% {/if}
{/if}
{#if receivedFiles.length > 0}

{$t("clipboard.received_files")}

{#each receivedFiles as file, index}
{file.name} {formatFileSize(file.size)}
downloadReceivedFile(file)} > ⬇ {$t("clipboard.download")} removeReceivedFile(index)} > ✕
{/each}
{/if} {#if receivingFiles && currentReceivingFile}

{$t("clipboard.receiving")}: {currentReceivingFile.name}

{Math.round(transferProgress)}% ({formatFileSize(currentReceivingFile.receivedSize)} / {formatFileSize(currentReceivingFile.size)})
{/if} {/if}
{$t("clipboard.disconnect")}
{/if}