From f576701baabbd0172550efe18c422650e0d15ee1 Mon Sep 17 00:00:00 2001 From: Ku6epXBOCTuK Date: Sat, 22 Aug 2026 16:49:26 +0500 Subject: [PATCH] feat: add ctrl+v flow --- web/src/lib/components/DropZone.svelte | 6 ++---- web/src/lib/components/ToolPage.svelte | 22 +++++++++++++++++++++- web/src/lib/core/io.ts | 4 ++++ 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/web/src/lib/components/DropZone.svelte b/web/src/lib/components/DropZone.svelte index f8b0f4c..b11a757 100644 --- a/web/src/lib/components/DropZone.svelte +++ b/web/src/lib/components/DropZone.svelte @@ -1,5 +1,5 @@ + +

{tool.title}

{tool.description}

diff --git a/web/src/lib/core/io.ts b/web/src/lib/core/io.ts index 91b9a4d..f2094d4 100644 --- a/web/src/lib/core/io.ts +++ b/web/src/lib/core/io.ts @@ -11,6 +11,10 @@ export function isSupportedImage(file: File): boolean { return SUPPORTED_MIME_TYPES.has(file.type); } +export function unsupportedImageMessage(file: File): string { + return `Неподдерживаемый формат файла (${file.type || 'неизвестный'}). Поддерживаются PNG, JPEG, WebP, GIF и BMP.`; +} + export async function decodeFile(file: File): Promise { const bitmap = await createImageBitmap(file); try {