From c32d447a072b3ec0161c1127b0d0df59e459f468 Mon Sep 17 00:00:00 2001 From: thefoxcost Date: Fri, 28 Nov 2025 12:36:34 -0800 Subject: [PATCH] Add success toast after file conversion --- package.json | 2 +- src/lib/types/file.svelte.ts | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 4698882..7fd9030 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "@inlang/paraglide-js": "^2.5.0", "@poppanator/sveltekit-svg": "^5.0.1", "@sveltejs/adapter-static": "^3.0.10", - "@sveltejs/kit": "^2.49.0", + "@sveltejs/kit": "^2.49.0", "@sveltejs/vite-plugin-svelte": "^4.0.4", "@types/eslint": "^9.6.1", "@types/sanitize-html": "^2.16.0", diff --git a/src/lib/types/file.svelte.ts b/src/lib/types/file.svelte.ts index e7d14d1..02f44c7 100644 --- a/src/lib/types/file.svelte.ts +++ b/src/lib/types/file.svelte.ts @@ -112,6 +112,7 @@ export class VertFile { ? await this.convertZip(converter) : await converter.convert(this, this.to, ...args); this.result = res; + this.toastSuccess(); } catch (err) { if (!this.cancelled) this.toastErr(err); this.result = null; @@ -120,6 +121,14 @@ export class VertFile { return res; } + private toastSuccess() { + ToastManager.add({ + type: "success", + message: `✅ ${this.file.name} converted to ${this.to.toUpperCase()} and ready to download`, + }); + } + + private async convertZip(converter: Converter): Promise { const { extractZip, createZip } = await import("$lib/util/zip"); const { default: PQueue } = await import("p-queue");